public Workflow AddWorkflow(Workflow entity)
        {
            Uow.WorkflowRepository.Add(entity);

            Uow.CommitChanges();

            return entity;
        }
Ejemplo n.º 2
0
 public WorkflowViewModel(Workflow entity)
 {
     ID = entity.ID;
     Name = entity.Name;
     Description = entity.Description;
 }
        public Workflow UpdateWorkflow(Int32 id, Workflow changes)
        {
            var entity = GetWorkflow(new Workflow { ID = id });

            if (entity != null)
            {
                entity.Name = changes.Name;
                entity.Description = changes.Description;

                Uow.CommitChanges();
            }

            return entity;
        }
 public Workflow GetWorkflow(Workflow entity)
 {
     return Uow.WorkflowRepository.Get(new Workflow { ID = entity.ID });
 }