Vote count:
0
when i try to update my entry in update function it's execute successfully but database not updated.
please find the following code
public static string UpdateEmployee(Employee employee)
{
using (var db = new RandDEntities())
{
var empObj = db.Employees.First(x => x.EmpID == employee.EmpID);
db.Entry(empObj).State = EntityState.Modified;
db.SaveChanges();
}
return "";
}
Thanks in advance
asked 28 secs ago
Aucun commentaire:
Enregistrer un commentaire