Skip to content

Instantly share code, notes, and snippets.

@StephanyBatista
Last active May 23, 2016 18:34
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 StephanyBatista/79c9227bb6d4dcb538baf50892096650 to your computer and use it in GitHub Desktop.
Save StephanyBatista/79c9227bb6d4dcb538baf50892096650 to your computer and use it in GitHub Desktop.
public void ConfigureServices(IServiceCollection services)
{
// Add framework services.
services.AddApplicationInsightsTelemetry(Configuration);
services.AddDbContext<ApplicationDbContext>(options =>
options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
services.AddIdentity<ApplicationUser, IdentityRole>()
.AddEntityFrameworkStores<ApplicationDbContext>()
.AddDefaultTokenProviders();
services.AddMvc();
// Add application services.
services.AddTransient<IEmailSender, AuthMessageSender>();
services.AddTransient<ISmsSender, AuthMessageSender>();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment