static protected void Register <T>(String fixtureName, Expression <Func <T, bool> > predicate) where T : class { T fixture = Context.Set <T>().FirstOrDefault(predicate); Fixtures[fixtureName] = fixture; TestRepositories.AddFixtureToContext(fixture); }
static protected void Add <T>(String fixtureName, T fixture) where T : class { Fixtures[fixtureName] = fixture; Context.Set <T>().Add(fixture); TestRepositories.AddFixtureToContext(fixture); }