1. Tony Fahlberg
  2. Beta Testing
  3. Thursday, 9 January 2020 07:13 AM UTC

Hi - I am doing some evaluation of PowerBuilder 2019R2 SnapDevelop.  I am using DWNet.Data.IDataStore<TModel> to retrieve some data and would now like to Evaluate a DataWindow Expression but do not see the method. 

 

I believe there is a DWNet.Data.DataStore.Evaluate<TValue>(string expression) but cannot seem to use it with my DWNet.Data.IDataStore<TModel> object.  Any help you can provide on how I may Evaluate a DataWindow Expression would be much appreciated.

 

Thanks,

Accepted Answer
Logan Liu @Appeon Accepted Answer Pending Moderation
  1. Friday, 10 January 2020 16:48 PM UTC
  2. Beta Testing
  3. # Permalink

Hi Tony,

You're right. So far, there is no Evaluate <TValue> (string expression). But have you ever tried using LINQ, Lambda expressions instead of PB Expression? They are easier to maintain.

If you only need to quickly migrate the original business logic from the PB, please use the DataStore first. If you are creating a new project with high maintainability, it is recommended to use DataStore <T>.

Regards, Logan

Comment
  1. Tony Fahlberg
  2. Friday, 10 January 2020 19:36 PM UTC
Hi - Thanks for the information. I am trying to quickly migrate a large amount of business logic from PB so, as you suggested, will use the DataStore for this implementation. I am using a Class Library project therefore needed to inherited from the abstract class DWNet.Data.DataStoreHost to parse my DW Models to generate the metadata needed by the DataStore object. This worked great with DWNet.Data (2.0.0-beta).



When updating my project to reference 2.0.0-beta2 libraries the DataStoreHost class no longer exists. How should I go about doing this with 2.0.0-beta2 so that I can use the DataStore.

Thanks again, Tony
  1. Helpful
  1. Logan Liu @Appeon
  2. Thursday, 30 January 2020 06:40 AM UTC
Please call DwModelManager.LoadDwModels with DWNet.Data (2.0.0-beta2).

Note that you can use its parameter "options" to specify from which assemblies to load models. If assemblies are not specified, it loads models from the assemblies that have been loaded into the execution context of the current application domain.
  1. Helpful
There are no comments made yet.
Logan Liu @Appeon Accepted Answer Pending Moderation
  1. Sunday, 12 January 2020 01:43 AM UTC
  2. Beta Testing
  3. # 1

Hi Tony,

Please call DwModelManager.LoadDwModels. Notice its parameter.

Regards, Logan

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.