public Food() { _db = new FreezerContext(); _typesRepository = new TypesListRepository(); _types = _typesRepository.GetAllTypes(); _portionsRepository = new PortionsListRepository(); _portions = _portionsRepository.GetAllPortions(); }
public SearchPortionController() //Costruttore-->Get lista freeezer da Repository { _portionsRepository = new PortionsListRepository(); _portions = _portionsRepository.GetAllPortions(); }
public ActionResult <string> GetPortions() { return(new JsonResult(_portionsRepository.GetAllPortions())); }