public bool SaveEmployee(Empdata emp) { using (var db = new chinniDBEntities1()) { db.Empdatas.Add(emp); db.SaveChanges(); } return(true); }
public bool Update(Empdata emp) { using (var db = new chinniDBEntities1()) { db.Entry(emp).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); } return(true); }
public bool Delete(Empdata emp) { using (var del = new chinniDBEntities1()) { del.Entry(emp).State = EntityState.Deleted; del.SaveChanges(); } return(true); }