private MyPlantService CreateMyPlantService() { var userID = Guid.Parse(User.Identity.GetUserId()); var myPlantService = new MyPlantService(userID); return(myPlantService); }
public IHttpActionResult Get() { MyPlantService myPlantService = CreateMyPlantService(); var myPlants = myPlantService.GetMyPlants(); return(Ok(myPlants)); }