Created
February 16, 2019 02:18
-
-
Save fugaku/4ecc86347066755cc8ecbc01de67ac1b to your computer and use it in GitHub Desktop.
EF Core Getting Started
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) | |
| { | |
| services.Configure<CookiePolicyOptions>(options => | |
| { | |
| // This lambda determines whether user consent for non-essential cookies is needed for a given request. | |
| options.CheckConsentNeeded = context => true; | |
| options.MinimumSameSitePolicy = SameSiteMode.None; | |
| }); | |
| var connection = "Server=localhost;Port=5432;Database=Test;User Id=postgres;Password=postgres;"; | |
| services.AddDbContext<AppContext>(options => options.UseNpgsql(connection)); | |
| services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment