예제 #1
0
        public IHttpActionResult Get()
        {
            var teamPages = _teamPageService.GetTeamPagesByOwner(ApplicationContext.Current.CurrentUser.Id);

            var model = new List <TeamPageModel>();

            foreach (var page in teamPages)
            {
                var pModel = page.ToEntityModel(_mediaService);
                model.Add(pModel);
            }

            return(Response(new {
                Success = true,
                TeamPages = model
            }));
        }
예제 #2
0
        public IHttpActionResult Get()
        {
            var teamPages = _teamPageService.GetTeamPagesByOwner(_workContext.CurrentCustomer.Id);

            var model = new List <TeamPageModel>();

            foreach (var page in teamPages)
            {
                var pModel = Mapper.Map <TeamPageModel>(page);
                pModel.PageUrl = Url.RouteUrl("TeamPage", new RouteValueDictionary()
                {
                    { "teamId", page.Id }
                });
                model.Add(pModel);
            }

            return(Response(new {
                Success = true,
                TeamPages = model
            }));
        }