Exemplo n.º 1
0
 public Error.Types Delete()
 {
     Rds.ExecuteNonQuery(
         transactional: true,
         statements: new SqlStatement[]
     {
         Rds.DeleteTenants(
             where : Rds.TenantsWhere().TenantId(TenantId))
     });
     return(Error.Types.None);
 }
Exemplo n.º 2
0
        public Error.Types Delete()
        {
            var statements = new List <SqlStatement>();

            statements.AddRange(new List <SqlStatement>
            {
                Rds.DeleteTenants(
                    where : Rds.TenantsWhere().TenantId(TenantId))
            });
            Rds.ExecuteNonQuery(
                transactional: true,
                statements: statements.ToArray());
            return(Error.Types.None);
        }
Exemplo n.º 3
0
        public Error.Types Delete()
        {
            var statements = new List <SqlStatement>();

            var where = Rds.TenantsWhere().TenantId(TenantId);
            statements.AddRange(new List <SqlStatement>
            {
                Rds.DeleteTenants(where : where)
            });
            var response = Rds.ExecuteScalar_response(
                transactional: true,
                statements: statements.ToArray());

            return(Error.Types.None);
        }
Exemplo n.º 4
0
        public ErrorData Delete(Context context, SiteSettings ss, bool notice = false)
        {
            var statements = new List <SqlStatement>();

            var where = Rds.TenantsWhere().TenantId(TenantId);
            statements.AddRange(new List <SqlStatement>
            {
                Rds.DeleteTenants(where : where)
            });
            var response = Rds.ExecuteScalar_response(
                context: context,
                transactional: true,
                statements: statements.ToArray());
            var tenantHash = SiteInfo.TenantCaches.Get(context.TenantId)?.TenantHash;

            if (tenantHash.Keys.Contains(TenantId))
            {
                tenantHash.Remove(TenantId);
            }
            return(new ErrorData(type: Error.Types.None));
        }