Пример #1
0
        public bool DeleteById(Guid id)
        {
            var entity = _reportRepository.FindById(id);

            if (entity == null)
            {
                return(false);
            }
            var result = true;

            using (UnitOfWork.Build(_reportRepository.DbContext))
            {
                result = _reportRepository.DeleteById(id);
                //delete assigned roles
                _roleObjectAccessService.DeleteByObjectId(id, ReportDefaults.ModuleName);
                //solution component
                _solutionComponentService.DeleteObject(entity.SolutionId, entity.ReportId, ReportDefaults.ModuleName);
                //localization
                _localizedLabelService.DeleteByObject(id);
            }
            return(result);
        }