예제 #1
0
        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);
        }
예제 #2
0
 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);
 }
예제 #3
0
 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();
 }