Пример #1
0
        public IHttpActionResult Get(int userId)
        {
            UserEstateService userEstateService = CreateUserEstateService();
            var userEstates = userEstateService.GetFavoriteEstates(userId);

            return(Ok(userEstates));
        }
Пример #2
0
        private UserEstateService CreateUserEstateService() //Allows a user to create a favorites list and then add additional Estates to their favorites. Acts as both Create and Update
        {
            var userId            = Guid.Parse(User.Identity.GetUserId());
            var userEstateService = new UserEstateService(userId);

            return(userEstateService);
        }