コード例 #1
0
        public ActionResult Create()
        {
            ViewBag.AddressId  = new SelectList(addressRepo.GetItems(), "Id", "AddressString");
            ViewBag.CustomerId = new SelectList(customerRepo.GetItems(), "Id", "Name");

            return(View());
        }
コード例 #2
0
        // GET: Address
        public ActionResult Index()
        {
            var model = repository.GetItems();

            return(View(model));
        }