Example #1
0
 /// <summary>
 /// 保存实例
 /// </summary>
 /// <param name="keyValue"></param>
 /// <param name="entity"></param>
 /// <returns></returns>
 public int SaveEntity(string keyValue, WFProcessTransitionHistoryEntity entity)
 {
     try
     {
         int num;
         if (string.IsNullOrEmpty(keyValue))
         {
             entity.Create();
             num = this.BaseRepository().Insert(entity);
         }
         else
         {
             entity.Modify(keyValue);
             num = this.BaseRepository().Update(entity);
         }
         return(num);
     }
     catch
     {
         throw;
     }
 }