public IHttpActionResult Get(int id) { MyParkService myParkService = CreateMyParkService(); var myPark = myParkService.GetMyParkByID(id); return(Ok(myPark)); }
private MyParkService CreateMyParkService() { var userId = Guid.Parse(User.Identity.GetUserId()); var myParkService = new MyParkService(userId); return(myParkService); }
public IHttpActionResult GetAll() { MyParkService myParkService = CreateMyParkService(); var myParks = myParkService.GetMyPark(); return(Ok(myParks)); }