Created
May 7, 2020 02:56
-
-
Save httpmurilo/55c8cf5e6640fc102f4d94070afbe544 to your computer and use it in GitHub Desktop.
trecho do configure service
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.AddDbContext<DataContext>(opt => opt.UseInMemoryDatabase("InMemory")); | |
services.AddTransient<DataContext, DataContext>(); | |
services.AddControllers(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment