// GET: Depts/Details/5 public async Task <IActionResult> Details(int?id) { if (id == null) { return(NotFound()); } //var dept = await _context.Dept // .FirstOrDefaultAsync(m => m.Id == id); var dept = await _deptService.GetDept(id); if (dept == null) { return(NotFound()); } return(View(dept)); }
public IHttpActionResult Get(int DeptID) { var response = service.GetDept(DeptID); return(Ok(response)); }