Esempio n. 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);
        }
Esempio n. 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));
        }
Esempio n. 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());
        }
Esempio n. 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());
        }