【发布时间】:2013-02-15 16:22:13
【问题描述】:
这是我的模特:
public class Course
{
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; }
}
当我想使用 EF 模板创建我的新控制器时,
在我使用 EF5 时,它不会同时创建 Level 和 Format 字段
我的问题是什么?
谢谢你的建议
【问题讨论】:
标签: asp.net-mvc-4 ef-code-first entity-framework-5