DevExpress eXpress Persistent Objects (XPO) ORM demos for .NET Core / .NET Standard 2.0
Switch branches/tags
Nothing to show
Clone or download
Latest commit 0ea0606 Dec 12, 2018

README.md

DevExpress XPO for .NET Core / .NET Standard 2.0 Demos

This repository contains demo projects demonstrating how to use eXpressPersistent Objects™ (XPO) in .NET Standard 2.0 applications. You can use these projects to learn how to use XPO in console, ASP.NET Core or Xamarin applications. All required DevExpress references are included.

XPO for .NET Core / Standard 2.0 Logo

Prerequisites

Download and install .NET Core 2.1 SDK.

Available Free of Charge without Technical Support

If you do not require technical assistance from our Support Team, you can use fully-functional XPO - ORM Library in your applications free of charge. Support is included with several paid subscriptions, including a dedicated XPO - ORM Library Subscription license. Learn more...

To install the required binaries, use the DevExpress.Xpo NuGet package or Unified Installer for .NET and HTML5 Developers.

Get the Sources

Clone this repository:

git clone https://github.com/DevExpress/XpoNetCoreDemos.git

If you do not have Git installed, download and extract the ZIP archive using the GitHub web interface.

Console Demo Build Status

The solution located in the XpoConsoleCoreDemo subfolder is a .NET Standard 2.0 console application, demonstrating how to initialize the data layer and perform basic data operations. To run the application, execute the following commands in the repository root folder (XpoNetCoreDemos by default):

cd XpoConsoleCoreDemo\XpoConsoleCoreDemo
dotnet restore
dotnet run

The project is configured to use a local SQLite database. You can modify the code in the Program.cs file to configure another database connection (e.g., MS SQL Server or any other supported database).

ASP.NET Core Razor Pages Demo Build Status

The solution located in the XpoASPNETCoreDemo subfolder is a .NET Standard 2.0 console application that displays a simple view with basic operations (create, delete, list). To run the application, execute the following commands in the repository root folder:

cd XpoASPNETCoreDemo\DevExpress.Xpo.AspNetCoreDemo
dotnet restore
dotnet run

Then, open http://localhost:5000 in your web browser.

The project is configured for a local SQLite database. Modify the Startup.cs and appsettings.json files to configure another database connection (e.g., MS SQL Server or any other supported database). Check out the ASP.NET Core Dependency Injection in XPO help topic for more information.

ASP.NET Core MVC Demo Build Status

The solution located in the XpoASPNETCoreMVCDemo subfolder is a .NET Standard 2.0 console application that displays a simple view with basic operations (create, delete, list). To run the application, execute the following commands in the repository root folder:

cd XpoASPNETCoreMVCDemo\DevExpress.Xpo.AspNetCoreMVCDemo
dotnet restore
dotnet run

Then, open http://localhost:5000 in your web browser.

The project is configured for a local SQLite database. Modify the Startup.cs and appsettings.json files to configure another database connection (e.g., MS SQL Server or any other supported database). Check out the ASP.NET Core Dependency Injection in XPO help topic for more information.

Xamarin Demo

The solution located in the XpoXamarinFormsDemo subfolder demonstrates the use of XPO in Xamarin.Forms. It contains the following projects:

  • DevExpress.Xpo.XamarinFormsDemo.UI - the common .NET Standard 2.0 project with business logic (data layer initialization, data manipulation) and page layouts;
  • DevExpress.Xpo.XamarinFormsDemo.Android Build status - Android app project;
  • DevExpress.Xpo.XamarinFormsDemo.iOS Build status - iOS app project;
  • DevExpress.Xpo.XamarinFormsDemo.UWP - UWP app project.

To try this demo, open the solution in Visual Studio 2017 for Windows 15.6.0 or Visual Studio 2017 for Mac 7.4.0 or a newer version. In order to use .NET Standard 2.0 in UWP, you need to target "Windows 10 Fall Creators Update" as the minimum version of your UWP project.

The demo is configured to use the in-memory data provider with XML storage. Modify the App.xaml.cs file in the DevExpress.Xpo.XamarinFormsDemo.UI project to configure another database connection (e.g., SQLite, MS SQL Server or any other supported database).

ORM Benchmark

The solution located in the ORMBenchmark subfolder is a benchmark that you can use to test XPO against Entity Framework Core and Entity Framework 6. You can view the benchmark results at ORMBenchmark/README.md.

Learn More

This tutorial demonstrates how to create an XPO-based .NET Standard 2.0 console application that initializes the data layer and performs basic data operations: Getting Started with .NET Core.

Your feedback is needed!

We would greatly appreciate it if you participate in this short survey (6 questions, ~3 min).

See Also