This code shows how to connect a .NET application to an InterSystems server using your choice of ADO.NET, XEP, Native, Entity Framework, and multi-model access.. It is required for the .NET QuickStart.
adoNETplaystocks.cs
to see how to store and retrieve data relationallyxepplaystocks.cs
to see how to quickly store objectsnativeplaystocks.cs
to see how to run methods within InterSystems IRISmultiplay.cs
to see multi-model access using ADO.NET, XEP, and Native APIProgram.cs
to see how to use Entity Framework, a third-party tool to work with objects
config.txt
: contains connection details for ADO.NET, XEP, Native API and multi-model.App.config
: located in EFPlay folder, contains connections details, parameters and initial settings for Entity Framework.
-
Verify you have an instance of InterSystems IRIS, and an IDE that supports .NET (such as Microsoft Visual Studio).
-
Load the sample stock data into InterSystems IRIS:
$ iris load http://github.com/intersystems/Samples-Stock-Data
-
Clone this repo and open it in your IDE.
-
Get the required drivers from the installation directory of your InterSystems instance and put them in the packages folder of this cloned repo, following the instructions in documentation.
- For Entity Framework, also follow these instructions to get the Entity Framework pacakges in the first video of Using Entity Framework with InterSystems IRIS.
-
With Microsoft Visual Studio:
- Select File → Open → Project/Solution. Choose the
quickstarts-dotnet.sln
. - Select View → Solution Explorer to view project structure.
- Right click on Solution. Select Add → Existing item. Choose
config.txt
. - Open
config.txt
file and modify theIP
andpassword
to be the correct values for your InterSystems IRIS instance.Port
andusername
are most likely the defaults but you can verify those as well.
- Select File → Open → Project/Solution. Choose the
-
Due to its complexity, Entity Framework requires a few more steps to set up the IDE and configuration file. If you want to try using Entity Framework, please follow our instructions in section 6 - "Use Entity Framework, an example of a third-party API, to store objects to InterSystems IRIS", of .NET QuickStart.
You should now have several classes for ADO.NET, XEP, Native API, multi-model and Entity Framework.
Detailed instructions are included on the .NET QuickStart page.