public bool ChangePassword(User user, string outPassword, string newPassword) { user = context.Users.Where(u => user.Id == u.Id).FirstOrDefault(); if (user.Password == outPassword) { user.Password = newPassword; context.SaveChanges(); return(true); } return(false); }
public Chat CreateChat(Chat chat) { context.Chats.Add(chat); context.SaveChanges(); return(chat); }