public static Orderedpizzas Map(Library.Orderedpizzas orderedpizzas) => new Orderedpizzas { Orderedpizzasid = orderedpizzas.Orderedpizzasid, Meatlover = orderedpizzas.Meatlover, Supreme = orderedpizzas.Supreme, Hawaiian = orderedpizzas.Hawaiian, Margherita = orderedpizzas.Margherita, Meatloverqty = orderedpizzas.Meatloverqty, Supremeqty = orderedpizzas.Supremeqty, Hawaiianqty = orderedpizzas.Hawaiianqty, Margheritaqty = orderedpizzas.Margheritaqty, Pizzascost = orderedpizzas.Pizzascost, // MeatloverNavigation = Map(orderedpizzas.MeatloverNavigation), // SupremeNavigation = Map(orderedpizzas.SupremeNavigation), // HawaiianNavigation = Map(orderedpizzas.HawaiianNavigation), // MargheritaNavigation = Map(orderedpizzas.MargheritaNavigation), // Orderdetails = Map(orderedpizzas.Orderdetails).ToList(), };
public void Addpizzaorder(Library.Orderedpizzas pizzas) { _db.Add(Mapper.Map(pizzas)); }