I want to map sub categories model which has foreign key for category model to categories model using "valueinjecter" mapping.
I have made "viewmodel" and write list<category>
type property in it and now I want to bind sub categories to it.
Tables are as follows according to your specifications Categories table:
Id Name
1 gender
2 Role
Sub Categories table:
Id CategoryId Name
1 1 Male
2 1 Femal
3 2 admin
4 2 user