public static Location Map(Data.Locations location) => new Location { Name = location.LocationName, Dough = location.DoughQ.Value, Sauce = location.SouceQ.Value, Cheese = location.CheeseQ.Value, Pepperoni = location.PepperoniQ.Value };
public static Data.Locations Map(LocationW locationW) { Data.Locations location = new Data.Locations { Id = locationW.Id, LocationName = locationW.LocationName, DoughQ = locationW.DoughQ, SouceQ = locationW.SouceQ, CheeseQ = locationW.CheeseQ, PepperoniQ = locationW.PepperoniQ }; return(location); }
public static Location Map(Data.Locations location) => new Location { StoreID = location.StoreId, Pepperoni = location.Pepperoni, Sausage = location.Sausage, Chicken = location.Chicken, Bacon = location.Bacon, Olives = location.Olives, Onions = location.Onions, Dough = location.Dough, MarinaraSauce = location.MarinaraSauce, BuffaloSauce = location.BuffaloSauce, BBQSauce = location.Bbqsauce, Cheese = location.Cheese };
// single object conversions public static Location Map(Data.Locations otherLoc) => new Location { Name = otherLoc.Name, Stock = Map(otherLoc.LocationIngredientJunction), OrderHistory = Map(otherLoc.Orders).Select(o => o.Id).ToList() };