Skip to content

Instantly share code, notes, and snippets.

@btodts btodts/Startup.cs
Last active Mar 8, 2018

Embed
What would you like to do?
ConfigureServices
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
// Add framework services.
services.AddDbContext<ApplicationDbContext>(options =>
options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
services.AddMvc();
// Add application services.
services.AddTransient<IEmailSender, EmailSender>();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.