Exemplo n.º 1
0
        public void RemoveFlowById(long flowId)
        {
            var flow = _dbContext.KnowledgeMaps.FirstOrDefault(f => f.Id == flowId);

            if (flow != null)
            {
                var steps = _dbContext.Steps.Where(s => s.MapId == flowId);
                if (steps != null)
                {
                    _dbContext.Steps.RemoveRange(steps);
                }
                // flow.IsDeleted = true;
                _dbContext.KnowledgeMaps.Remove(flow);
                _dbContext.SaveChanges();
            }
        }
Exemplo n.º 2
0
 public bool SaveChanges()
 {
     return(_dbContext.SaveChanges() > 0);
 }