public static void SaveUser(User user)
 {
     using (var context = new ReminderDBContext())
     {
         context.Users.Attach(user);
         context.Entry(user).Property(x => x.LastLoginDate).IsModified = true;
         context.Entry(user).Property(x => x.LogOut).IsModified        = true;
         context.SaveChanges();
     }
 }
Example #2
0
 public static void SaveReminder(Reminder reminder)
 {
     using (var context = new ReminderDBContext())
     {
         context.Entry(reminder).State = EntityState.Modified;
         context.SaveChanges();
     }
 }