Exemple #1
0
 public void UpdateAdminUserRoleAssignments(AdminUserRoleCollection roles)
 {
     using (SqlDataReaderWrapper dataReaderWrapper = new SqlDataReaderWrapper(this.Registry.ConnectionStringDefault))
     {
         dataReaderWrapper.ProcedureName = "AdminUser_UpdateAdminUserRolesByXmlGuidList";
         dataReaderWrapper.AddGuid("AdminUserId", this.Id);
         dataReaderWrapper.AddNVarChar("AdminUserRoleXmlGuidList", roles.ToXmlGuidList());
         dataReaderWrapper.ExecuteNonQuery();
     }
 }
Exemple #2
0
 public override SqlTransaction Delete(SqlConnection connection, SqlTransaction transaction)
 {
     this.EnsureValidId();
     transaction = this.EnsureDatabasePrepared(connection, transaction);
     using (SqlDataReaderWrapper dataReaderWrapper = new SqlDataReaderWrapper(connection, false))
     {
         dataReaderWrapper.ProcedureName = "AdminUser_Delete";
         dataReaderWrapper.AddGuid("AdminUserId", this.Id);
         dataReaderWrapper.ExecuteNonQuery(transaction);
     }
     transaction = base.Delete(connection, transaction);
     return(transaction);
 }