Method
GetGenderList()
has a return type of
IEnumerable<genderdto></genderdto>
.
However, model (value that is returned) is of type
GenderDTO
.
Use the following code instead
GenderDTO model = new GenderDTO();
var gender = from g in db.CAT_GENDER
select g;
model.GenderList = new SelectList(gender, "ID", "Description");
List<genderdto> itms = new List<genderdto> ();
itms.Add(model);
return itms;</genderdto></genderdto>