예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
 public async Task Delete(IdInput <Guid> input)
 {
     await _repository.DeleteAsync(input.Id);
 }
예제 #4
0
 public async Task <ApiResponse> DeleteAsync(Int64 id) => await _cmsRepository.DeleteAsync(id);