Exemple #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());
 }
Exemple #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());
 }