Ejemplo n.º 1
0
        // 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));
        }
Ejemplo n.º 2
0
        public IHttpActionResult Get(int DeptID)
        {
            var response = service.GetDept(DeptID);

            return(Ok(response));
        }