public IEnumerable <Fruit> GetAll() { var result = _fruitService.GetFruits(); //_context.FruitItems.ToList(); Console.WriteLine(result); return(result); }
public ActionResult <IEnumerable <Fruit> > GetFruits() { try { var fruits = _fruitService.GetFruits(); return(Ok(fruits)); } catch (Exception) { return(StatusCode(500)); } }
public string MixIt() { return(string.Join(",", fruit.GetFruits().Select(x => x.Name).ToArray())); }
public ActionResult <IEnumerable <Fruit> > Get() { return(_fruitService.GetFruits()); }