Skip to content

Instantly share code, notes, and snippets.

@cosoria
Created October 11, 2017 15:30
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 cosoria/dcd0439297ac925332cd2896e86073bf to your computer and use it in GitHub Desktop.
Save cosoria/dcd0439297ac925332cd2896e86073bf to your computer and use it in GitHub Desktop.
Sample Application DbContext
public class ApplicationDbContext<TContext> : EntityFrameworkContext<TContext> where TContext : DbContext, IEntityFrameworkContext
{
protected ApplicationDbContext() : this(new ConnectionStringProvider().GetDefaultConnectionString())
{
}
protected ApplicationDbContext(string nameOrConnectionString) : base(nameOrConnectionString)
{
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment