public void UpdateEntity(CODE_ORGANEntity entity)
 {
     try
     {
         this.BaseRepository().Update(entity);
     }
     catch (Exception ex)
     {
         if (ex is ExceptionEx)
         {
             throw;
         }
         else
         {
             throw ExceptionEx.ThrowServiceException(ex);
         }
     }
 }
 public void PhysicalDelRecord(string keyValue)
 {
     try
     {
         CODE_ORGANEntity entity = new CODE_ORGANEntity()
         {
             ORGANID = Convert.ToInt32(keyValue)
         };
         this.BaseRepository().Delete(entity);
     }
     catch (Exception ex)
     {
         if (ex is ExceptionEx)
         {
             throw;
         }
         else
         {
             throw ExceptionEx.ThrowServiceException(ex);
         }
     }
 }
        /// <summary>
        /// 插入数据
        /// </summary>
        /// <param name="model"></param>
        public void Post(CODE_ORGANEntity model)
        {
            CODE_ORGANService service = new CODE_ORGANService();

            service.SaveEntity(model);;
        }
        /// <summary>
        /// 更新数据,幂等
        /// </summary>
        /// <param name="key"></param>
        /// <param name="model"></param>
        public void Put([FromODataUri] string key, CODE_ORGANEntity model)
        {
            CODE_ORGANService service = new CODE_ORGANService();

            service.UpdateEntity(model);
        }