Esempio n. 1
0
 public string DeleteEmpInfo(EmployeeInfo objEmployee)
 {
     _db.Remove(objEmployee);
     _db.SaveChanges();
     return("Delete Successfully");
 }
Esempio n. 2
0
        public EmployeeInfo GetEmployeeById(int id)
        {
            EmployeeInfo employee = _db.Employees.FirstOrDefault(s => s.EmployeeId == id);

            return(employee);
        }
Esempio n. 3
0
 public string UpdateEmployee(EmployeeInfo objEmployee)
 {
     _db.Employees.Update(objEmployee);
     _db.SaveChanges();
     return("Update Successfully");
 }
Esempio n. 4
0
 public string Create(EmployeeInfo objEmployee)
 {
     _db.Employees.Add(objEmployee);
     _db.SaveChanges();
     return("Save Successfully");
 }