Entity Framework Core: DbContextOptionsBuilder does not contain a definition for 'usesqlserver' and no extension method 'usesqlserver'

前端 未结 30 3166
星月不相逢
星月不相逢 2020-12-13 03:14

I am new to EF core and I\'m trying to get it to work with my ASP.NET Core project.

I get the above error in my startup.cs when trying configure the

30条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-13 03:58

    Copying the following code into the TodoApi.csproj from https://github.com/aspnet/Docs/tree/master/aspnetcore/tutorials/first-web-api/sample/TodoApi solved similar issue for me.

    
    
      
        netcoreapp2.0
      
    
      
        
      
    
      
        
      
    
      
        
      
    
    
    

    Microsoft.AspNetCore.All may be excessive but it includes EntityFrameworkCore

提交回复
热议问题