Cannot create controller with Entity framework - Unable to retrieve metadata

前端 未结 7 1991
慢半拍i
慢半拍i 2021-02-12 20:35

I\'m using VS2013

When I try to create an \"MVC 5 Controller with views using entity Framework\" I get the following error:

the         


        
7条回答
  •  悲&欢浪女
    2021-02-12 21:28

    Problem may be because of missing [NotMapped] Attribute in one of the model class.

    As I missed the attribute and I was cunning my head.

    [Display(Name="Logo")]
    [DataType(DataType.Upload)]
    [NotMapped]
    public HttpPostedFileBase Logo { set; get; }
    

提交回复
热议问题