public static YourStore.Library.Customer MapCustomer(Entities.Customers c) { YourStore.Library.Order ord = new YourStore.Library.Order(); return(new YourStore.Library.Customer { FirstName = c.FirstName, LastName = c.LastName, Zip = c.Zip, Id = c.Id, Username = c.UserName, Pass = c.Pass, }); }
/// <summary> /// Returns Model for a single customer by Customer Id. /// </summary> /// <param name="customerId"></param> /// <returns>Model for customer</returns> public Library.Models.Customers GetSingleCustomer(string customerId) { Entities.Customers customer = _dbContext.Customers.Where(n => n.CustomerId.ToString().Contains(customerId)).First(); return(Mapper.MapAllCustomers(customer)); }