EF 5 Enable-Migrations : No context type was found in the assembly

后端 未结 24 2095
野的像风
野的像风 2020-12-02 11:51

I have 4 projects :

Toombu.Entities : all models are there
Toombu.DataAccess: Mapping, Repository and ToombuContext
Toombu.Logique : Logic of my application         


        
24条回答
  •  情书的邮戳
    2020-12-02 12:29

    Thanks for the suggestions, I solved the problem by combining all the solutions here. At first I created the DbContext Model:

     public class MyDbContext: DbContext
        {
            public MyDbContext()
            {
            }
        }
    

    After creating the dbcontext class, I ran the enable-migration command with the project Name: enable-migrations -ProjectName YourProjectName

提交回复
热议问题