public IEnumerable <Donation> GetDonations(DonationArguments donationArgs) { return(_raffleContext.Donations.Where(donation => (donationArgs.name == null || donation.Name == donationArgs.name) && (donationArgs.email == null || donation.Name == donationArgs.name) && (donationArgs.amountMin == 0 || donation.Amount >= donationArgs.amountMin) && (donationArgs.amountMax == 0 || donation.Amount <= donationArgs.amountMax) && (donationArgs.eventID == 0 || donation.Event == donationArgs.eventID) )); }
public override int GetHashCode() { unchecked { int hashCode = Id; hashCode = (hashCode * 397) ^ (ServiceEntry != null ? ServiceEntry.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (PriceId != null ? PriceId.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (AlgoName != null ? AlgoName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0); hashCode = (hashCode * 397) ^ UseWindow.GetHashCode(); hashCode = (hashCode * 397) ^ MinProfit.GetHashCode(); hashCode = (hashCode * 397) ^ Hashrate.GetHashCode(); hashCode = (hashCode * 397) ^ Power.GetHashCode(); hashCode = (hashCode * 397) ^ (Priority != null ? Priority.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Affinity; hashCode = (hashCode * 397) ^ (Folder != null ? Folder.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Command != null ? Command.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Arguments != null ? Arguments.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (DonationFolder != null ? DonationFolder.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (DonationCommand != null ? DonationCommand.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (DonationArguments != null ? DonationArguments.GetHashCode() : 0); return(hashCode); } }