private string FindCustomerForReservation(List<Invoice> invoices, List<ApplicationUser> customers, Reservation currentReservation) { string customername; Invoice correspInvoice = invoices.Find(f => f.Id == currentReservation.Invoicenumber); ApplicationUser customer = customers.Find(k => k.Id == correspInvoice.CustomerId); customername = customer.UserName; return customername; }
customers
if( customers != null && customers.Count > 0){ //do the query here }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)