public bool DeleteUser(UserVM user) { var users = _userRepo.GetAll().ToList(); Users neUsers = new Users() { Adress = user.Adress, Age = user.Age, BirthDay = user.BirthDay, FirstName = user.FirstName, LastName = user.LastName, Email = user.Email, Entitie = user.Entitie, Gender = user.Gender, IDCardNumber = user.IDCardNumber, Password = user.Password, Phone = user.Phone, Orders = new List <Orders>() }; if (!user.Equals(users)) { return(false); } _userRepo.Delete(neUsers); Mapper.MapUserFromUserVM(neUsers); return(true); }