我是asp.net mvc ef 7的新手,试图从vb.net迁移.
我有一个课程如下
[Table("MatGrp")]
public class MatGrp
{
[Key]
public decimal Grp_RNo { get; set; }
[Required]
[MaxLength(30)]
[Display(Name = "Group Code")]
public string Grp_Code { get; set; }
[Required]
[MaxLength(100)]
[Display(Name = "Group Name")]
public string Grp_Name { get; set; }
public decimal Cre_By { get; set; }
public DateTime Cre_DtTm { get; set; }
public decimal Mod_By { get; set; }
[DataType(DataType.DateTime)]
public System.DateTime Mod_DtTm { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
我为这个类生成了一个控制器,如果我删除公共System.DateTime Mod_DtTm {get; 组; 来自该类的列,但添加此列会在此堆栈跟踪中显示错误
处理请求时发生未处理的异常. …