예제 #1
0
        public IActionResult Create()
        {
            var model = new BookCreateEditViewModel()
            {
                Book         = new Book(),
                AddPublisher = publisherData.GetPublisers().Select(x => new SelectListItem
                {
                    Selected = false,
                    Value    = x.Id.ToString(),
                    Text     = x.Name
                }).ToList()
            };

            return(View(model));
        }
예제 #2
0
        public IActionResult Index()
        {
            var model = new PublishersIndexViewModel();

            model.Publishers = publisherData.GetPublisers();
            return(View(model));
        }