Ejemplo n.º 1
0
        //This method should be used to delete an existing user.
        public bool DeleteUser(string userId)
        {
            User user = context.Users.Find(userId);

            context.Users.Remove(user);
            context.SaveChanges();
            return(true);
        }
Ejemplo n.º 2
0
 //This method should be used to save a new reminder.
 public Reminder CreateReminder(Reminder reminder)
 {
     context.Reminders.Add(reminder);
     context.SaveChanges();
     return(reminder);
 }
Ejemplo n.º 3
0
 /*
  * This method should be used to save a new category.
  */
 public Category CreateCategory(Category category)
 {
     context.Categories.Add(category);
     context.SaveChanges();
     return(category);
 }
Ejemplo n.º 4
0
 // This method should be used to save a new note.
 public Note CreateNote(Note note)
 {
     context.Notes.Add(note);
     context.SaveChanges();
     return(note);
 }