예제 #1
0
 protected override void OnModelCreating(ModelBuilder builder)
 {
     base.OnModelCreating(builder);
     foreach (var type in ScaffoldUtility.GetModelTypes())
     {
         builder.Entity(type).HasData(Fixture.Items[type]);
     }
 }
예제 #2
0
        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);
            }
        }