Skip to content

Instantly share code, notes, and snippets.

@clausjoergensen
Created January 30, 2012 10:34
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 clausjoergensen/1703785 to your computer and use it in GitHub Desktop.
Save clausjoergensen/1703785 to your computer and use it in GitHub Desktop.
public class MeterTestDataContext : DbContext, IMeterTestDataContext
{
public MeterTestDataContext(string fileOrServerOrConnection)
: base(fileOrServerOrConnection)
{
}
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.Entity<TestPoint>()
.HasRequired(x => x.TestPointConfiguration)
.WithRequiredPrincipal();
}
public IDbSet<AcceptanceTest> AcceptanceTests
{
get;
set;
}
public IDbSet<AcceptanceTestRevision> AcceptanceTestRevisions
{
get;
set;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment