0

I Have a table named families, where i have nested families of products. All the entries of the table that have a length lower than 5, are parent families, and the families with a length of 5, are families with associated products. For example: ID Name

001    food 
00101  cookies
002    Cars
00201  ferrari
003    bike
00301  yamaha

Thats an example of my Db. I want to represent it on mvc c# list. But the problem is, that I need to group it by Id, and order it by name too. For example, I would like to have:

003 bike
00301 yamaha
002 Cars
00201 ferrari
001    food 
00101  cookies

What I want to order alphabetically is the name of parent Families (Bike,Cars,Food).

I'm using ElevateDb and MVC 4 c# in the other side, maybe, there is a way to do it in the c# list too.

ekad
  • 14,436
  • 26
  • 44
  • 46

1 Answers1

0

This is a very poor database design. You should consider creating a separate Families table:

001 food
002 cars
003 bike