コード例 #1
0
        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);
        }
コード例 #2
0
 public DomTopping GetTopping(int id)
 {
     return(DataDomainMapper.Topping2DomTopping(_db.Topping.Where <Topping>(t => t.Id == id).FirstOrDefault()));
 }