示例#1
0
        public void EditAsync(TaskModel model)
        {
            if (model.DueDate < DateTime.Now)
            {
                model.IsCompleted = true;
            }


            else
            {
                model.IsCompleted = false;
            }

            var result = base.GetContext.Tasks.Find(model.TaskId);

            result.TaskName    = model.TaskName;
            result.DueDate     = model.DueDate;
            result.Description = model.Description;
            result.IsCompleted = model.IsCompleted;
            GetContext.Update(result);
            base.Save();
        }