Skip to content

Instantly share code, notes, and snippets.

@rahulsahay19
Created July 7, 2017 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rahulsahay19/1e0f4916d4ac1273f92c22dc40c8f5d6 to your computer and use it in GitHub Desktop.
Save rahulsahay19/1e0f4916d4ac1273f92c22dc40c8f5d6 to your computer and use it in GitHub Desktop.
IMovieRepository
public void ConfigureServices(IServiceCollection services)
{
services.AddAutoMapper();
services.AddScoped<IMovieRepository, MovieRepository>();
//Added DbContext
services.AddDbContext<MovieReviewDbContext>(options => options.UseSqlServer(Configuration.GetConnectionString("Default")));
// Add framework services.
services.AddMvc();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment