Help with converting Blazor Entity Framework Sample App to use SQL Server instead of Sqlite
I am new to Blazor. I want to change the ASP.NET Core Blazor Server with Entity Framework Core (EF Core) Sample Application from Sqlite to SQL Server. I created the Contacts table in Sql Server based on the Contact.cs model. I modified the Program.cs to use SQL Server like this:
builder.Services.AddDbContextFactory<ContactContext>(opt => opt.UseSqlServer(@"data source=mydatasource;initial catalog=acatalog;user id=auserid;Password=thepassword;Integrated Security=False;"));
When I run the app the Contacts page loads records into the grid, but when I try to view or edit a contact, I get a null reference execption in the ConcurrencyFiled.razor.OnInitialize method.
I realize that the ContactContext.cs probably needs to be modified.
My question is: Is this something that is relatively easy to do? If so any guidance or links to documentation would be appreciated.