Exemplo n.º 1
0
        public async Task <bool> Delete(string id)
        {
            if (!_isAuthorized || !await _repositoryCategory.Any(x => x.State == MRApiCommon.Infrastructure.Enum.MREntityState.Active && x.Id == id))
            {
                throw _eNotFound("Category not found");
            }

            await _repositoryCategory.DeleteSoftFirst(x => x.Id == id);

            return(true);
        }