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