コード例 #1
0
        public bool DeleteDocument(int id)
        {
            var document = _dbContext.Document.Include(x => x.Case).Include(x => x.DocumentCategory).FirstOrDefault(d => d.DocumentId == id);

            document.IsDeleted = true;
            var response = _dbContext.Update(document);

            AddToHistory(document);
            _dbContext.SaveChanges();
            return(response != null);
        }