Exemplo n.º 1
0
        public ActionResult Profile(string userId)
        {
            var sets = userSetService.GetAllForUser(int.Parse(userId));

            ViewBag.listItems = sets;
            User korisnik = userService.GetById(int.Parse(userId));

            return(View(korisnik));
        }
        public ActionResult MySets()
        {
            IEnumerable <Theme> themes = themeRepository.Query();
            SearchSetModel      model  = new SearchSetModel();

            model.AllThemes  = themes;
            model.Action     = "MySets";
            model.Controller = "Inventory";

            var user = HttpContext.User as CustomPrincipal;
            var sets = userSetService.GetAllForUser(user.Id, 20);

            ViewBag.listItems = sets.ToList();

            return(View(model));
        }
        public List <UserLSetApi> GetAllForUser(int userId, int take = -1, int offset = 0)
        {
            var allSets = userSetServices.GetAllForUser(userId, take, offset).ToList();

            return(Mapper.Map <List <UserLSetApi> >(allSets));
        }