Пример #1
0
        private MyPlantService CreateMyPlantService()
        {
            var userID         = Guid.Parse(User.Identity.GetUserId());
            var myPlantService = new MyPlantService(userID);

            return(myPlantService);
        }
Пример #2
0
        public IHttpActionResult Get()
        {
            MyPlantService myPlantService = CreateMyPlantService();
            var            myPlants       = myPlantService.GetMyPlants();

            return(Ok(myPlants));
        }