public Parcel[] GetAllParcels() { Parcel[] parcels = { }; try { parcels = _parcelService.GetAllParcels(); } catch (ParcelNotFoundInDatabaseException e) { Console.WriteLine(e.Message); } return(parcels); }
public async Task <ActionResult <List <Parcel> > > GetAllParcels() { return(Ok(await _parcelService.GetAllParcels())); }