InterSystems supports three lightweight .NET APIs that provide direct access to InterSystems IRIS® databases via relational tables, objects, or multidimensional storage.
.NET features available in InterSystems IRIS include:
Feel free to watch the video or try the exercise below.
With .NET, you can interact with InterSystems IRIS relationally (with ADO.NET), using objects (with XEP or Entity Framework), or natively (with the Native API). In the steps below, you will access a set of sample stock data using each of the ways described.
cd /home/project git clone -b try-iris http://github.com/intersystems/quickstarts-dotnet
connections.config
file and change the value of IP
to Please launch the sandbox before continuing! and the value of port
to Please launch the sandbox before continuing!.Use the standard ADO.NET API for SQL-based access to relational tables.
adoNETplaystocks.cs
to view the ADO.NET code. You will notice the connection string uses these variables to connect:connect.ConnectionString = "Server = " + ip + "; Port = " + port + "; Namespace = " + Namespace + "; Password = " + password + "; User ID = " + username;
adoNETplaystocks.cs
:cd /home/project/quickstarts-dotnet/ADO dotnet run
This code uses standard ADO.NET to create, read, update, and delete data within InterSystems IRIS. With the InterSystems IRIS driver, you can easily connect and use ADO.NET in the way you expect.
Use XEP for high performance, real-time object insertions.
xepplaystocks.cs
to view the XEP code. You will notice the connection string uses these variables to connect:xepPersister.Connect(ip, port, Namespace, username, password);
xepplaystocks.cs
:cd /home/project/quickstarts-dotnet/XEP dotnet run
With XEP, you can efficiently stores objects directly to InterSystems IRIS, requiring no translation to rows.
Use the Native API to store to a custom structure and call InterSystems IRIS methods or routines.
nativeplaystocks.cs
to view the Native API code. You will notice the connection string uses these variables to connect:connect.ConnectionString = "Server = " + ip + "; Port = " + port + "; Namespace = " + Namespace + "; Password = " + password + "; User ID = " + username;
nativeplaystocks.cs
:cd /home/project/quickstarts-dotnet/NativeAPI dotnet run
With the Native API, you can efficiently store data in your own custom data structure, allowing you to answer questions you could not answer using tables or objects. Additionally, you can call class methods and routines from within InterSystems IRIS using the Native API.
Use ADO.NET, XEP, and Native access side by side, choosing the best model for each task.
multimodelplaystocks.cs
to see how all APIs work together. You will notice the connection string uses these variables to connect:xepPersister.Connect(ip, port, Namespace, username, password);
EventPersister
inherits from IRISConnection
, all ways to connect leverage the same underlying connection to InterSystems IRIS.multimodelplaystocks.cs
:cd /home/project/quickstarts-dotnet/Multi-model dotnet run
With InterSystems IRIS, you can use one connection, and use the method that is best for each task, decreasing the time it takes to develop your applications while also increasing your application performance. XEP efficiently stores objects directly to InterSystems IRIS, requiring no translation to rows. It is worth mentioning that ADO.NET can also be used to retrieve the data stored using XEP, reducing data redundancy.
To give you the best possible experience, this site uses cookies and by continuing to use the site you agree that we can save them on your device.