public int update(T obj) { if (obj is myEntitiesBase) { myEntitiesBase o = obj as myEntitiesBase; DateTime now = DateTime.Now; o.createdOn = now; o.modifiedOn = now; o.modifiedUserName = app.common.GetUserName();; } return(save()); }
public int insert(T obj) { _objectSet.Add(obj); if (obj is myEntitiesBase) { myEntitiesBase o = obj as myEntitiesBase; DateTime now = DateTime.Now; o.createdOn = now; o.modifiedOn = now; //o.modifiedUserName = app.common.GetUserName(); } return(save()); }