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

后端 未结 24 2089
野的像风
野的像风 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:30

    namespace EntityFrameworkCodeFirst.Module
    {
        public class MyDbContext: DbContext
        {
            public MyDbContext()
            {
            }
        }
    }
    

    And if you have Multiple project in one solution than you have to use below commands:-

    Enable-Migrations -ProjectName EntityFrameworkCodeFirst
    

提交回复
热议问题