public ActionResult Create() { ViewBag.BiodataList = new SelectList(BiodataRepo.All(), "Id", "NPM"); ViewBag.CategoryList = new SelectList(CategoryRepo.All(), "Id", "Name"); ViewBag.BookList = new SelectList(BookRepo.ByCategory(0), "Id", "Judul"); return(PartialView("_Create", new PeminjamanViewModel())); }
public ActionResult GetByCategory(long categoryId) { return(View(BookRepo.ByCategory(categoryId))); }