//To Update the records of a particluar employee public void UpdateEmployee(Employee employee) { try { db.Entry(employee).State = EntityState.Modified; db.SaveChanges(); } catch { throw; } }
//To Update the records of a particluar employee public int UpdateEmployee(TblEmployee employee) { try { db.Entry(employee).State = EntityState.Modified; db.SaveChanges(); return(1); } catch { throw; } }
public int UpdatePolicy(Policy policy) { try { db.Entry(policy).State = EntityState.Modified; db.SaveChanges(); return(1); } catch { throw; } }
public int UpdateEvent(TblEvents events) { try { string cute_String; string MyString = events.Photo; cute_String = MyString.Remove(0, 12); events.Photo = cute_String; db.Entry(events).State = EntityState.Modified; db.SaveChanges(); return(1); } catch { throw; } }