private static DTO.PricesDTO converDTOPrices(PizzaPrice prices) { DTO.PricesDTO dtoPrices = new DTO.PricesDTO(); dtoPrices.Id = prices.Id; dtoPrices.Onions = prices.Onions; dtoPrices.Pepperoni = prices.Pepperoni; dtoPrices.Sausage = prices.Sausage; dtoPrices.GreenPeppers = prices.GreenPeppers; dtoPrices.PriceCrustRegular = prices.PriceCrustRegular; dtoPrices.PriceCrustThick = prices.PriceCrustThick; dtoPrices.PriceCrustThin = prices.PriceCrustThin; dtoPrices.PriceSizeLarge = prices.PriceSizeLarge; dtoPrices.PriceSizeMedium = prices.PriceSizeMedium; dtoPrices.PriceSizeSmall = prices.PriceSizeSmall; return dtoPrices; }
public static DTO.PricesDTO getPrices() { var db = new BobsPizzaDbEntities1(); var prices = db.Prices.First(); DTO.PricesDTO pricesDTO = new DTO.PricesDTO(); pricesDTO.Small = prices.Small; pricesDTO.Medium = prices.Medium; pricesDTO.Large = prices.Large; pricesDTO.Regular = prices.Regular; pricesDTO.Thin = prices.Thin; pricesDTO.Thick = prices.Thick; pricesDTO.Sausage = prices.Sausage; pricesDTO.Pepperoni = prices.Pepperoni; pricesDTO.Onions = prices.Onions; pricesDTO.GreenPeppers = prices.GreenPeppers; return pricesDTO; }
public static DTO.PricesDTO getPrices() { var db = new BobsPizzaDbEntities1(); var prices = db.Prices.First(); DTO.PricesDTO pricesDTO = new DTO.PricesDTO(); pricesDTO.Small = prices.Small; pricesDTO.Medium = prices.Medium; pricesDTO.Large = prices.Large; pricesDTO.Regular = prices.Regular; pricesDTO.Thin = prices.Thin; pricesDTO.Thick = prices.Thick; pricesDTO.Sausage = prices.Sausage; pricesDTO.Pepperoni = prices.Pepperoni; pricesDTO.Onions = prices.Onions; pricesDTO.GreenPeppers = prices.GreenPeppers; return(pricesDTO); }