No context type was found in the assembly

后端 未结 5 1159
失恋的感觉
失恋的感觉 2020-12-30 19:53

I\'m using .NET 4.0, MVC3, and EF5 with code first.

My solution is split up into three projects, with the dependencies as indicated:

Project.Web -> Project.B

5条回答
  •  星月不相逢
    2020-12-30 20:51

    For whom who made this mistake like I did:

    Your context class must inherits from DbContext, just like that:

    public class DirectorRequestContext : DbContext
    {
        public DbSet DirectorRequests { get; set; }
    }
    

提交回复
热议问题