The default DbConfiguration instance was used before the 'EntityFrameworkConfiguration' type was discovered

前端 未结 3 1388
情歌与酒
情歌与酒 2021-01-11 17:09
 public class EntityFrameworkConfiguration : DbConfiguration
    {
        public EntityFrameworkConfiguration()
        {
            this.SetModelCacheKey(ctx =>         


        
3条回答
  •  一生所求
    2021-01-11 17:44

    In my case i have two different edmx files and both are in different class libraries. I got this error when i added those two libraries in the same project.

    I don't have any single clue how is that sorted out but; when i call any method from my first DbContext class, the second one worked like miracle happened. It was throwing this error when second context class called first. My Ef version is: 6.4

提交回复
热议问题