Skip to content

Instantly share code, notes, and snippets.

@subhendu-de
Created December 9, 2018 14:05
Show Gist options
  • Save subhendu-de/60c2facc6eee2efa75b4c978bb6dc393 to your computer and use it in GitHub Desktop.
Save subhendu-de/60c2facc6eee2efa75b4c978bb6dc393 to your computer and use it in GitHub Desktop.
using eKart.Api.Model;
using Microsoft.EntityFrameworkCore;
public void ConfigureServices(IServiceCollection services)
{
services.AddScoped<IDatasourceContext, SQLServerContext>();
services.AddDbContext(options => options.UseSqlServer(@"Server=.;Database=eKart;Trusted_Connection=True;ConnectRetryCount=0"));
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment