public async Task <IActionResult> Create([Bind("Id,Name,Department,Salary,Manager,Phone,Email")] Employee employee)
        {
            ViewBag.id = HttpContext.Session.GetInt32("Id");
            if (ViewBag.id > 0)
            {
                if (ModelState.IsValid)
                {
                    employee.IsManager = true;
                    _context.Add(employee);
                    await _context.SaveChangesAsync();

                    TempData["success"] = "New Employee Added Success.....";
                    return(RedirectToAction(nameof(Index)));
                }
                return(View(employee));
            }
            else
            {
                TempData["msg"] = "Please Login First Then You Should Navigate To Add Data";
                return(RedirectToAction("Index", "Home"));
            }
        }
 public async Task Delete(Employee employee)
 {
     _context.Employee.Remove(employee);
     await _context.SaveChangesAsync();
 }