asp.net mvc 4 - Using Complex DataType in EF CodeFirst -
this model :
public class course of study { public int id { get; set; } public string title { get; set; } public string institute { get; set; } public string instructor { get; set; } public string duration { get; set; } public level level { get; set; } public format format { get; set; } public datetime released { get; set; } public string filesize { get; set; } public string desciption { get; set; } } public enum level { beginner, intermediate, advanced } public enum format { avi, hd, fullhd } public class coursedb:dbcontext { public dbset<course> courses { get; set; } }
when want create new controller scoffolding using ef template, it's not create both level
, format
fields while using ef5 what's problem? in advise
enum types not supported when scaffolding, why fields not created.
my advice utilize helper method such : working enums in asp.net mvc 3
and code manually.
update:
looks there ticket logged back upwards here: http://mvcscaffolding.codeplex.com/workitem/10
asp.net-mvc-4 ef-code-first entity-framework-5
No comments:
Post a Comment