public void DeleteEmployee_sp(int EmpId)
 {
     using (var empEntities = new EmployeeDBEntities())
     {
         var employee = empEntities.Employees.FirstOrDefault(x => x.ID == EmpId);
         empEntities.Employees.Remove(employee);
         empEntities.SaveChanges();
     }
 }
 public int AddEmployee(EmpDTO Emp)
 {
     using (var empEntities = new EmployeeDBEntities())
     {
         var employee = Emp.ToEntity();
         empEntities.Employees.Add(employee);
         empEntities.SaveChanges();
         return employee.ID;
     }
 }
 public void UpdateEmployee(EmpDTO Emp)
 {
     using (var empEntities = new EmployeeDBEntities())
     {
         var employee = empEntities.Employees.FirstOrDefault(x => x.ID == Emp.ID);
         employee.JoinDate = Emp.JoinDate;
         employee.Name = Emp.Name;
         employee.Salary = Emp.Salary;
         employee.DepartmentID = Emp.DepartmentID;
         empEntities.SaveChanges();
     }
 }