public IActionResult create() { var data = department.Get(); ViewBag.depts = new SelectList(data, "id", "DepartmentName"); var data2 = country.Get(); ViewBag.countries = new SelectList(data2, "Id", "CountryName"); return(View()); }