Example #1
0
 public virtual void Remove(Congty Congty)
 {
     try
     {
         db.Congties.DeleteOnSubmit(Congty);
         db.SubmitChanges();
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }
Example #2
0
 public virtual void Create(Congty Congty)
 {
     try
     {
         this.db.Congties.InsertOnSubmit(Congty);
         db.SubmitChanges();
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }
Example #3
0
 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);
Example #7
0
 public virtual int Delete(Congty Congty)
 {
     try
     {
         //Congty.IsDelete = true;
         db.SubmitChanges();
         return 0;
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }