Esempio n. 1
0
        public void Update(TaskList item)
        {
            var updateList = db.TaskLists.FirstOrDefault(l => l.Id == item.Id);

            updateList.Name            = item.Name;
            db.Entry(updateList).State = EntityState.Modified;
        }
Esempio n. 2
0
        public void Update(Subtask item)
        {
            var updateSubtask = db.Subtasks.FirstOrDefault(s => s.Id == item.Id);

            updateSubtask.Record          = item.Record;
            updateSubtask.IsComplited     = item.IsComplited;
            db.Entry(updateSubtask).State = EntityState.Modified;
        }
        public void Update(User item)
        {
            var updateUser = db.Users.FirstOrDefault(u => u.Id == item.Id);

            updateUser.Name                = item.Name;
            updateUser.Email               = item.Email;
            updateUser.Password            = item.Password;
            updateUser.PhotoPath           = item.PhotoPath;
            updateUser.BackgroundImagePath = item.BackgroundImagePath;
            db.Entry(updateUser).State     = EntityState.Modified;
        }
Esempio n. 4
0
        public void Update(TodoItem item)
        {
            var updateItem = db.TodoItems.FirstOrDefault(i => i.Id == item.Id);

            updateItem.Record           = item.Record;
            updateItem.CompletionDate   = item.CompletionDate;
            updateItem.IsCompleted      = item.IsCompleted;
            updateItem.IsMarked         = item.IsMarked;
            updateItem.Note             = item.Note;
            updateItem.NotificationDate = item.NotificationDate;
            db.Entry(updateItem).State  = EntityState.Modified;
        }