Пример #1
0
        public ActionResult Index()
        {
            var     books = BookAPI.GetAllBooks();
            UserDTO user  = null;

            if (User.Identity.IsAuthenticated)
            {
                user = UserAPI.GetUser(User.Identity.Name);
            }
            var model = new HomePageModel {
                Books = books, User = user
            };

            return(View(model));
        }