Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public class CarServiceContextInitTests
// to have the same Configuration object as in Startup
private IConfigurationRoot _configuration;
// represents database's configuration
private DbContextOptions<CarServiceContext> _options;
public CarServiceContextInitTests()
var builder = new ConfigurationBuilder()
_configuration = builder.Build();
_options = new DbContextOptionsBuilder<CarServiceContext>()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment