public async Task DeleteAdminUserAsync(AdminDeleteDto dto) { try { await _adminUserRepository.DeleteAdminUserAsync(dto); } catch (Exception e) { throw e; } }
public async Task DeleteAdminUserAsync(AdminDeleteDto dto) { try { var args = new Dictionary <string, object> { { "@Email", dto.Email }, { "@ModifiedBy", dto.ModifiedBy } }; await ExecuteNonQueryAsync(DeleteAdminUserSpName, args); } catch (Exception e) { throw e; } }
public async Task <IHttpActionResult> DeleteAdminUserAsync([FromBody] AdminDeleteDto dto) { try { if (dto == null) { throw new InvalidParameterValueException(BodyShouldNotBeNull); } if (dto.ModifiedBy == null) { dto.ModifiedBy = HttpContext.Current.User.GetUserEmail()?.ToLower(); } var result = await PutAsync(_adminUserManager.DeleteAdminUserAsync, dto); return(result); } catch (Exception e) { throw e; } }