public TbCalisan GetEmployeeData(int id) { try { TbCalisan cs = db.TbCalisan.Find(id); return(cs); } catch { throw; } }
public int AddEmployee(TbCalisan calisan) { try { db.TbCalisan.Add(calisan); db.SaveChanges(); return(1); } catch { throw; } }
public int DeleteEmployee(int id) { try { TbCalisan cs = db.TbCalisan.Find(id); db.TbCalisan.Remove(cs); db.SaveChanges(); return(1); } catch { throw; } }
public int UpdateEmployee(TbCalisan calisan) { try { db.Entry(calisan).State = EntityState.Modified; db.SaveChanges(); return(1); } catch { throw; } }