예제 #1
0
        //This method should be used to update a existing note.
        public bool UpdateNote(Note note)
        {
            context.Entry <Note>(note).State = Microsoft.EntityFrameworkCore.EntityState.Modified;
            context.SaveChanges();

            return(true);
        }
예제 #2
0
 // This method should be used to update a existing reminder.
 public bool UpdateReminder(Reminder reminder)
 {
     context.Entry <Reminder>(reminder).State = Microsoft.EntityFrameworkCore.EntityState.Modified;
     context.SaveChanges();
     return(true);
 }
예제 #3
0
 /*
  * This method should be used to update a existing category.
  */
 public bool UpdateCategory(Category category)
 {
     context.Entry <Category>(category).State = Microsoft.EntityFrameworkCore.EntityState.Modified;
     context.SaveChanges();
     return(true);
 }
예제 #4
0
 //This method should be used to update an existing user.
 public bool UpdateUser(User user)
 {
     context.Entry <User>(user).State = Microsoft.EntityFrameworkCore.EntityState.Modified;
     context.SaveChanges();
     return(true);
 }