public List <DomTopping> GetToppingList() { List <Topping> inToppings = _db.Topping.ToList(); List <DomTopping> outToppings = new List <DomTopping>(); foreach (var t in inToppings) { outToppings.Add(DataDomainMapper.Topping2DomTopping(t)); } return(outToppings); }
public DomTopping GetTopping(int id) { return(DataDomainMapper.Topping2DomTopping(_db.Topping.Where <Topping>(t => t.Id == id).FirstOrDefault())); }