コード例 #1
0
        public IActionResult EditWithSubject(int id)
        {
            var data = repo.Get(id);

            if (data == null)
            {
                return(NotFound());
            }
            return(View(data));
        }
コード例 #2
0
        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());
        }
コード例 #3
0
 public IActionResult GetDepartments()
 {
     return(Ok(_mapper.Map <IEnumerable <DepartmentDTO> >(_departmentRepo.Get())));
 }
コード例 #4
0
 public IActionResult Index()
 {
     return(View(repo.Get()));
 }