private static bool HasMinSameCustomerData(CustomerAddAddressViewModel checkForCustomer, string firstName, string lastName, string phoneNumber) { return(checkForCustomer != null && checkForCustomer.FirstName == firstName && checkForCustomer.LastName == lastName && checkForCustomer.PhoneNumber == phoneNumber); }
private static bool HasMaxSameCustomerData(CustomerAddAddressViewModel checkForCustomer, string firstName, string lastName, string phoneNumber, string pickUpAddress, string deliveryAddress) { return(HasMinSameCustomerData(checkForCustomer, firstName, lastName, phoneNumber) && checkForCustomer.PickUpAddress == pickUpAddress && ((checkForCustomer.DeliveryAddress == null && deliveryAddress == null) || checkForCustomer.DeliveryAddress == deliveryAddress)); }