Created
March 13, 2018 20:20
-
-
Save btodts/2fc6e47e317baaf9e458125829665d3a to your computer and use it in GitHub Desktop.
ConfigureServices
This file contains 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
namespace Foo.Infrastructure.EntityFramework | |
{ | |
public static class ServiceCollectionExtensions | |
{ | |
public static void AddDataAccessServices(this IServiceCollection services, string connectionString) | |
{ | |
services.AddDbContext<ApplicationDbContext>(options => | |
options.UseSqlServer(connectionString)); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment