Exemple #1
0
        public FoodsController(IFoodService foodService, INutrientService nutrientService, IMapper mapper, INotificator notificator)
            : base(mapper, notificator)
        {
            _foodService = foodService;

            _nutrientService = nutrientService;
        }
Exemple #2
0
 public ActionResult <IEnumerable <NutrientResponse> > GetNutrients([FromServices] INutrientService nutrientService)
 {
     return(Ok(Mapper.Map <IEnumerable <NutrientResponse> >(nutrientService.GetAll())));
 }