Skip to content

Instantly share code, notes, and snippets.

@dsibinski
Created July 27, 2017 18:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsibinski/ae4a1fa5c1cf2797ff3f7f6e90d3ca9b to your computer and use it in GitHub Desktop.
Save dsibinski/ae4a1fa5c1cf2797ff3f7f6e90d3ca9b to your computer and use it in GitHub Desktop.
public class CarServiceContext : DbContext
{
// DB connection properties injected automatically
public CarServiceContext() {}
// DB connection properties given explicitly (for Unit Tests)
public CarServiceContext(DbContextOptions options) : base(options) { }
public DbSet<Car> Cars { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment