1. Tom Morgan
  2. .NET DataStore
  3. Tuesday, 15 November 2022 21:32 PM UTC

It seems like all sample code available shows webservice interfaces. I wish to replace a dll originally created with PowerBuilder .NET 12.1 and I don't think I need ASP.Net or webservice support as this is a simple client server project. I am looking to connect to a SQL Server database.

Francisco Martinez @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 16 November 2022 14:57 PM UTC
  2. .NET DataStore
  3. # 1

Hi Tom,

There are no specific examples out there that I know of. But the process should be pretty straight forward:

// First load the models manually with https://docs.appeon.com/net_datastore/4.x/api_reference/DWNet.Data/DwModelManager/Method/LoadDwModels.html

// Create a datacontext pointing to the DB
using var dataContext = new DataContext("<connection string>");


var dataStore = new DataStore<ModelName>(dataContext);
dataStore.Retrieve();

// dataStore indirectly implements IEnumerable, so you can use it however you would use an Enumerable

 

Regards,
Francisco

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.