public bool DeleteOrder(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.Delete(newOrder); Mappers.FromOrderToOrderVM(newOrder); return(true); }
public bool DeleteUser(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.Delete(newUser); Mappers.MapUserToUserVM(newUser); return(true); }