public void Create(DalTask e) { var task = new Task() { Title = e.Title, Description = e.Description, CreationDateTime = e.CreationDateTime, DeadlineDate = e.DeadlineDate, DeadlineTime = e.DeadlineTime, TotalPoints = e.TotalPoints }; _context.Set <Task>().Add(task); }
public void Delete(DalTask e) { var task = new ORM.Task() { TaskId = e.Id, Deadline = e.Deadline, Description = e.Description, UserId = e.UserId, StatusId = e.StatusId, ParentTaskId = e.ParentTaskId, ProjectId=e.ProjectId, IsChild=e.isChild }; task = context.Set<ORM.Task>().Single(t => t.TaskId == task.TaskId); context.Set<ORM.Task>().Remove(task); }
public void Create(DalTask e) { var task = new ORM.Task() { Deadline =e.Deadline, Description =e.Description, UserId = e.UserId, StatusId =e.StatusId, ParentTaskId = e.ParentTaskId, ProjectId=e.ProjectId, IsChild=e.isChild }; context.Set<ORM.Task>().Add(task); context.SaveChanges(); }