use sql server in .net core package code example
Example 1: how asp.net core works with sql server
public void ConfigureServices(IServiceCollection services)
{
services.AddRazorPages();
services.AddDbContext<RazorPagesMovieContext>(options =>
options.UseSqlServer(Configuration.GetConnectionString("RazorPagesMovieContext")));
}
Example 2: install package for sqlserver in asp.net core
Install-Package Microsoft.EntityFrameworkCore.SqlServer