public virtual void Remove(Congty Congty) { try { db.Congties.DeleteOnSubmit(Congty); db.SubmitChanges(); } catch (Exception e) { throw new Exception(e.Message); } }
public virtual void Create(Congty Congty) { try { this.db.Congties.InsertOnSubmit(Congty); db.SubmitChanges(); } catch (Exception e) { throw new Exception(e.Message); } }
public virtual void Update(Congty Congty) { try { Congty CongtyOld = this.GetById(Congty.ID); CongtyOld = Congty; db.SubmitChanges(); } catch (Exception e) { throw new Exception(e.Message); } }
partial void DeleteCongty(Congty instance);
partial void UpdateCongty(Congty instance);
partial void InsertCongty(Congty instance);
public virtual int Delete(Congty Congty) { try { //Congty.IsDelete = true; db.SubmitChanges(); return 0; } catch (Exception e) { throw new Exception(e.Message); } }