public bool UpdateOrder(OrderVM order) { var orders = _orderReop.GetAll().ToList(); Order newOrder = new Order() { Movie = new List <Movie>(), User = new User() }; if (orders.Equals(order)) { return(false); } _orderReop.Update(newOrder); Mappers.FromOrderToOrderVM(newOrder); return(true); }
public bool UpdateUser(UserVM user) { var users = _userReop.GetAll().ToList(); User newUser = new User() { Name = user.Name, LastName = user.LastName, Email = user.Email, UserName = user.UserName, Password = user.Password, PhoneNumber = user.PhoneNumber, Order = new List <Order>() }; if (!users.Equals(user)) { return(false); } _userReop.Update(newUser); Mappers.MapUserToUserVM(newUser); return(true); }