Exemple #1
0
        public override void UpdateDatabaseAfterUpdateSchema()
        {
            base.UpdateDatabaseAfterUpdateSchema();

            ObjectSpace.EnsureSingletons();

            if (ObjectSpace.GetObjectsCount(typeof(TokenObjectsEditorDemoTokens), null) == 0)
            {
                var faker = new Faker <TokenObjectsEditorDemoTokens>()
                            .CustomInstantiator(f => ObjectSpace.CreateObject <TokenObjectsEditorDemoTokens>())
                            .RuleFor(r => r.Name, f => f.Name.FirstName());

                var tokens = faker.Generate(100);

                ObjectSpace.CommitChanges();
            }
        }
Exemple #2
0
 public override void UpdateDatabaseAfterUpdateSchema()
 {
     base.UpdateDatabaseAfterUpdateSchema();
     ObjectSpace.EnsureSingletons();
 }