protected override void OnModelCreating(ModelBuilder builder) { base.OnModelCreating(builder); foreach (var type in ScaffoldUtility.GetModelTypes()) { builder.Entity(type).HasData(Fixture.Items[type]); } }
public void UpdateFacetContextFixture_IfParameterIsSetToTrue(bool updateTheModel, string hostName, string databaseName, string folder) { if (!updateTheModel) { return; } var serializer = CreateSerializer(); var path = Path.Combine(ScaffoldUtility.GetRootFolder(), folder); using (var context = CreateContext(hostName, databaseName)) { new JsonWriterService(serializer).SerializeTypesToPath(context, ScaffoldUtility.GetModelTypes(), path); } }