Exemplo n.º 1
0
 public FoodModel Create(Food food)
 {
   return new FoodModel()
   {
     Description = food.Description,
     Measures = food.Measures.Select(m => Create(m))
   };
 }
 public FoodModel Create(Food food)
 {
     return new FoodModel()
       {
     Url = _urlHelper.Link("Food", new { foodid = food.Id }),
     Description = food.Description,
     Measures = food.Measures.Select(m => Create(m))
       };
 }