예제 #1
0
        public async Task DeleteAsync(Guid id)
        {
            if (!ValidateId(id))
            {
                return;
            }

            await _service.DeleteAsync(w => w.Id == id);
        }
        public async Task Delete(Guid id)
        {
            if (!ValidateId(id))
            {
                return;
            }

            await service.DeleteAsync(id);
        }
예제 #3
0
        public async Task <IActionResult> Delete(Guid id)
        {
            if (id == Guid.Empty)
            {
                return(BadRequest());
            }

            await _productDomainService.DeleteAsync(w => w.Id == id);

            return(CreateResponseOnDelete(name));
        }
예제 #4
0
        public virtual async Task <IActionResult> Delete(long id)
        {
            var entity = await _repository.GetByIdAsync(id);

            if (entity == null)
            {
                return(NotFound());
            }
            await _domainService.DeleteAsync(entity);

            return(Ok());
        }
예제 #5
0
        public async Task DeleteAsync(Guid id)
        {
            if (!ValidateId(id))
            {
                return;
            }

            using (var uow = _unitOfWorkManager.Begin())
            {
                await _service.DeleteAsync(w => w.Id == id);

                await uow.CompleteAsync().ForAwait();
            }
        }
        public async Task <IActionResult> Delete(Guid id)
        {
            await _crudService.DeleteAsync(id);

            return(CreateResponseOnDelete());
        }