Entity framework MVC4-在'中出现服务器错误/';应用

Entity framework MVC4-在'中出现服务器错误/';应用,entity-framework,asp.net-mvc-4,Entity Framework,Asp.net Mvc 4,我建立了一个简单的模型。StartDate是DateTime2的原因是,以前我尝试使用DateTime时,它给了我一个错误 public class Auction { [Key] public string Id { get; set; } [Required] public string Title { get; set; } public string Description { get; set; } [Column(TypeName =

我建立了一个简单的模型。StartDate是DateTime2的原因是,以前我尝试使用DateTime时,它给了我一个错误

 public class Auction
{
    [Key]
    public string Id { get; set; }
    [Required]
    public string Title { get; set; }
    public string Description { get; set; }
    [Column(TypeName = "DateTime2")]
    [Display(Name = "StartTime")]
    public DateTime StartTime { get; set; }
    [Column(TypeName = "DateTime2")]

    public DateTime EndTime { get; set; }
    public int StartPrice { get; set; }
    public int CurrentPrice { get; set; }
    public string category { get; set; }

    public virtual Collection<Bid> Bids { get; private set; }

    public int BidCount
    {
        get { return Bids.Count; }
    }

    public Auction()
    {
        Bids = new Collection<Bid>();

    }
我在尝试保存更改时遇到此错误:

 Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.Entity.Validation.DbEntityValidationException: Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.

调试时,
EntityValidationErrors
中有什么?传递给控制器的拍卖信息是什么?我猜缺少信息,因此EF无法保存。请将BidCount标记为[未映射]!看起来您正在数据库中创建该列,而该列不是细微差别的,也不是模型列!!
 Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.Entity.Validation.DbEntityValidationException: Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.