예제 #1
0
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            using (var db = new ProxyConfigurationDbContext())
            {
                db.Database.ExecuteSqlCommand(IdentityHelper.DeleteSql(
                                                  AumentumSecurityObjectModel.BaseValueSegementSecurityObjectModel.Name,
                                                  AumentumSecurityObjectModel.BaseValueSegementSecurityObjectModel.Resources.BaseValueSegmentConclusion,
                                                  ServiceTypes.Service));

                db.Database.ExecuteSqlCommand(IdentityHelper.DeleteSql(
                                                  AumentumSecurityObjectModel.BaseValueSegementSecurityObjectModel.Name,
                                                  AumentumSecurityObjectModel.BaseValueSegementSecurityObjectModel.Resources.BaseValueSegmentHistory,
                                                  ServiceTypes.Service));

                db.Database.ExecuteSqlCommand(IdentityHelper.DeleteSql(
                                                  AumentumSecurityObjectModel.BaseValueSegementSecurityObjectModel.Name,
                                                  AumentumSecurityObjectModel.BaseValueSegementSecurityObjectModel.Resources.BaseValueSegmentTransaction,
                                                  ServiceTypes.Service));

                db.Database.ExecuteSqlCommand(IdentityHelper.DeleteSql(
                                                  AumentumSecurityObjectModel.BaseValueSegementSecurityObjectModel.Name,
                                                  AumentumSecurityObjectModel.BaseValueSegementSecurityObjectModel.Resources.Owner,
                                                  ServiceTypes.Service));

                db.SaveChanges();
            }
        }
 protected override void Down(MigrationBuilder migrationBuilder)
 {
     using (var db = new ProxyConfigurationDbContext())
     {
         db.Database.ExecuteSqlCommand(IdentityHelper.DeleteSql(
                                           AumentumSecurityObjectModel.BaseValueSegementSecurityObjectModel.Name,
                                           AumentumSecurityObjectModel.BaseValueSegementSecurityObjectModel.Resources.Flags,
                                           ServiceTypes.Service));
     }
 }