public async Task DeleteUser(IdInput <Guid> input) { var usr = await _repository.FirstOrDefaultAsync(x => x.Id == input.Id); if (usr.UserName == "admin") { throw new UserFriendlyException(string.Format(L("CanNotDeleteAdminUser"), "admin")); } await _repository.DeleteAsync(input.Id); }
public async Task DeleteTenant(EntityRequestInput <Guid> input) { var tenant = await _repository.FirstOrDefaultAsync(input.Id); if (tenant == null) { throw new AbpException("There is no tenant with id: " + input.Id); } await _repository.DeleteAsync(tenant); }
public async Task Delete(IdInput <Guid> input) { await _repository.DeleteAsync(input.Id); }
public async Task <ApiResponse> DeleteAsync(Int64 id) => await _cmsRepository.DeleteAsync(id);