예제 #1
0
 public int Update(T obj)
 {
     if (obj is MyEntitesBase)
     {
         MyEntitesBase o = obj as MyEntitesBase;
         o.ModifieOn         = DateTime.Now;
         o.ModifieOnUserName = App1.Common.GetCurrentUsername();
     }
     return(Save());
 }
예제 #2
0
 public int Insert(T obj)
 {
     db.Set <T>().Add(obj);
     if (obj is MyEntitesBase)
     {
         MyEntitesBase o   = obj as MyEntitesBase;
         DateTime      now = DateTime.Now;
         o.CreatedOn         = now;
         o.ModifieOn         = now;
         o.ModifieOnUserName = App1.Common.GetCurrentUsername();
     }
     return(Save());
 }