Just upgraded to asp.net core 2.1 and it seems like UseSqlServer no longer exists in the options for AddDbContext. (where I pass in the connectionstring)
What am I supposed to use instead?
Added nuget package Microsoft.EntityFrameworkCore.SqlServer and it worked again
You must add
using Microsoft.EntityFrameworkCore;
as explained in https://social.msdn.microsoft.com/Forums/en-US/f9cdb8de-0c4c-47ae-b0be-e4b52a887183/dbcontextoptionsbuilder-does-not-contain-a-definition-for-usesqlserver?forum=adodotnetentityframework
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With