I have generated the edmx model from the existing database and also using the EF4 DbContext to generate the model classes. Then I have created the partial classes with the same name to use for annotations. So far so good. But now I come to a point to edit a user. The user has UserType parameter which is a one to many relationship in the database. Basically I would like to achieve here is that I will put a html.dropdownlistfor for the model and it will pick up the all the usertype from the user type table and populate the dropdown list. What is the way of achieving this?
This is the field which is generated automatically by EF.
public virtual UserType userType { get; set; }
What changes I should make in the controller to get the list of the usertypes to pass it to the view?