//Read/Get all zoos method public IHttpActionResult Get() { ZooServices zooService = CreateZooService(); var zoos = zooService.GetZoos(); return(Ok(zoos)); }
//Read/Get zoo by ID public IHttpActionResult GetById(int id) { ZooServices zooService = CreateZooService(); var zoo = zooService.GetZooById(id); return(Ok(zoo)); }
private ZooServices CreateZooService() { var userId = Guid.Parse(User.Identity.GetUserId()); var zooService = new ZooServices(userId); return(zooService); }