Created
March 24, 2017 19:53
-
-
Save A-Programmer/3e3dfd1a90034c47cc9adcd1e1f46a64 to your computer and use it in GitHub Desktop.
ConfigureServices method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ConfigureServices(IServiceCollection services) | |
{ | |
// Add framework services. | |
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