//Get the details of a particular employee
 public TblEmployees GetEmployeeData(int id)
 {
     try
     {
         TblEmployees employee = db.TblEmployees.Find(id);
         return(employee);
     }
     catch
     {
         throw;
     }
 }
 //To Add new employee record
 public int AddEmployee(TblEmployees employee)
 {
     try
     {
         db.TblEmployees.Add(employee);
         db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }
 //To Delete the record of a particular employee
 public int DeleteEmployee(int id)
 {
     try
     {
         TblEmployees emp = db.TblEmployees.Find(id);
         db.TblEmployees.Remove(emp);
         db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }
        //To Update the records of a particluar employee
        public int UpdateEmployee(TblEmployees employee)
        {
            try
            {
                db.Entry(employee).State = EntityState.Modified;
                db.SaveChanges();

                return(1);
            }
            catch
            {
                throw;
            }
        }