public ActionResult <Farmer> Farmer(string farmerID) { var result = _mongoDBConnector.GetFarmersById(farmerID); if (result is null) { return(NotFound("Could not find farmer")); } return(new JsonResult(result)); }
public ActionResult <IEnumerable <string> > PhotosByFarmerID(string farmerID) { Farmer farmer = _mongoDBConnector.GetFarmersById(farmerID); if (farmer == null) { return(NotFound("Farmer not found")); } var imageList = _lichtBildConnector.GetPhotographiesByPosition(farmer.Position); return(new JsonResult(imageList)); }