Пример #1
0
 public virtual void Save()
 {
     using (TableAdapter <T> adapter = TableAdapter <T> .Open(new object[0]))
     {
         adapter.CreateUpdate(new object[] { this });
     }
 }
Пример #2
0
 public virtual int Save()
 {
     using (TableAdapter <T> adapter = TableAdapter <T> .Open())
     {
         Int64 i = adapter.CreateUpdate(this);
         if (i > 0)
         {
             return((int)i);
         }
         return(0);
     }
 }