Xtensive.Orm 7.2.0-Beta-2

This is a prerelease version of Xtensive.Orm.
dotnet add package Xtensive.Orm --version 7.2.0-Beta-2
                    
NuGet\Install-Package Xtensive.Orm -Version 7.2.0-Beta-2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Xtensive.Orm" Version="7.2.0-Beta-2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Xtensive.Orm" Version="7.2.0-Beta-2" />
                    
Directory.Packages.props
<PackageReference Include="Xtensive.Orm" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Xtensive.Orm --version 7.2.0-Beta-2
                    
#r "nuget: Xtensive.Orm, 7.2.0-Beta-2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Xtensive.Orm@7.2.0-Beta-2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Xtensive.Orm&version=7.2.0-Beta-2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Xtensive.Orm&version=7.2.0-Beta-2&prerelease
                    
Install as a Cake Tool

DataObjects.Net

DataObjects.Net is a persistence and object-relational mapping framework for the Microsoft .NET. It allows developers to define persistent objects as well as business logic directly in C#, Visual Basic or F#. The persistent objects can be retrieved by LINQ queries. Persistent data can be stored in SQL Servers. In contrast to many other ORM frameworks the database model is generated and maintained automatically.

Supported databases:

  • MS SQL Server 2008 R2, 2012, 2014, 2016, 2017, 2019, 2022
  • MS Azure SQL Database
  • Oracle 10g, 11g
  • PostgreSQL 8.3, 8.4, 9.x, 10, 11, 12, 13, 14, 15
  • MySQL 5.6, 5.7, 8.0
  • Firebird 2.5, 4.0
  • Sqlite 3

Providers for the databases are available as separate packages and may be installed following way

    dotnet add package Xtensive.Orm.SqlServer
    dotnet add package Xtensive.Orm.Oracle
    dotnet add package Xtensive.Orm.PostgreSQL
    dotnet add package Xtensive.Orm.MySql
    dotnet add package Xtensive.Orm.Firebird
    dotnet add package Xtensive.Orm.Sqlite

Usage

The following code demonstrates basic usage of DataObjects.Net. For full tutorial configuring Domain, defining the model and querying data see our documentation.

Create a domain configuration configuration to connect to certain database

    // create configuration with connection to Tests database on local instance of MS SQL Server
    var domainConfiguration = new DomainConfiguration(@"sqlserver://localhost/Tests");
	
    // register types form certain namespace which contains domain model persistent types -
	// the types derrived from Xtensive.Orm.Entity and/or Xtensive.Orm.Structure
    domainConfiguration.Types.Register(typeof (Person).Assembly, typeof (Person).Namespace);
	
    // create database structure from scratch
    domainConfiguration.UpgradeMode = DomainUpgradeMode.Recreate;

Build domain by the configuration created before. Usually, domain is built when the application starts and disposed just before the application shuts down.

    var domain = Domain.Build(domainConfiguration);

Query data from database, modify results and/or create new entites

    // open a session to database
    using (var session = domain.OpenSession()) {
	  // and transaction
      using (var transactionScope = session.OpenTransaction()) {
        // query for existing Anton Chekhov
        Author existingAuthor = session.Query.All<Author>()
          .Where(author => author.FirstName=="Anton" && author.LastName=="Chekhov")
          .FirstOrDefault();

        //if Anton Pavlovich isn't in database yet then and him
        if (existingAuthor==null) {
          existingAuthor = new new Author(session) {
            FirstName = "Anton",
            LastName = "Chekhov";
          }
        }

        // add new book and assign it with Anton Chekhov
        existingAuthor.Books.Add(new Book(session) {Title = "The Cherry Orchard"});

        // commit opened transaction to save changes made within it
        transactionScope.Complete();
      }
    }

Dispose domain on application shut down

    domain.Dispose();
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (16)

Showing the top 5 NuGet packages that depend on Xtensive.Orm:

Package Downloads
Xtensive.Orm.BulkOperations

Adds support for bulk insert, update and delete operations for DataObjects.Net-powered domain models

Xtensive.Orm.Tracking

Adds tracking functionality for DataObjects.Net-powered projects

Xtensive.Orm.PostgreSql

Adds support for PostgreSQL to DataObjects.Net

Xtensive.Orm.SqlServer

Adds support for MS SQL Server to DataObjects.Net

Xtensive.Orm.Web

Adds integration with ASP.NET for DataObjects.Net-powered projects

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
7.2.0-Beta-2 346 4/27/2025
7.2.0-Beta-1 548 12/28/2023
7.1.5 1,008 4/10/2025
7.1.4 12,563 1/27/2025
7.1.2 788 10/18/2024
7.1.1 22,255 11/14/2023
7.1.0 1,838 4/12/2023
7.1.0-RC 884 3/9/2023
7.1.0-Beta-2 965 12/19/2022
7.1.0-Beta-1 856 7/4/2022
7.0.6 397 12/19/2024
7.0.5 484 6/3/2024
7.0.4 827 11/12/2023
7.0.3 5,453 3/21/2022
7.0.2 4,444 2/8/2022
7.0.1 4,492 10/29/2021
7.0.0 3,222 6/2/2021
6.0.14 500 12/17/2024
6.0.13 727 4/4/2024
6.0.12 28,884 11/10/2023
6.0.11 3,677 1/12/2023
6.0.10 5,045 4/29/2022
6.0.9 5,071 2/2/2022
6.0.8 3,555 10/28/2021
6.0.7 58,203 8/27/2021
6.0.6 3,719 5/24/2021
6.0.5 3,877 3/9/2021
6.0.4 19,979 12/22/2020
6.0.3 4,140 9/29/2020
6.0.0 4,667 1/28/2020
5.1.0-Beta-1 7,567 1/30/2015
5.0.24 2,329 4/27/2021
5.0.23 2,232 2/4/2021
5.0.22 2,368 11/18/2020
5.0.21 2,324 11/6/2020
5.0.20 2,888 12/25/2019
5.0.19 20,328 5/30/2019
5.0.19-Beta-2 2,886 4/16/2019
5.0.19-Beta-1 2,825 12/29/2018
5.0.18 6,453 9/28/2018
5.0.18-Beta-3 2,948 7/2/2018
5.0.18-Beta-2 3,339 6/6/2018
5.0.18-Beta-1 3,262 4/24/2018
5.0.17 4,206 2/27/2018
5.0.17-Beta-3 3,159 2/12/2018
5.0.17-Beta-2 3,368 1/12/2018
5.0.17-Beta-1 2,206 12/28/2017
5.0.16 21,694 12/1/2017
5.0.16-Beta-1 3,176 9/27/2017
5.0.15 3,459 8/1/2017
5.0.14 3,437 6/19/2017
5.0.13 3,555 3/22/2017
5.0.12 3,261 2/14/2017
5.0.11 13,271 1/26/2017
5.0.11-RC2 3,133 12/16/2016
5.0.11-RC 3,522 9/20/2016
5.0.10 6,027 8/5/2016
5.0.10-RC 3,204 6/30/2016
5.0.9 4,254 3/3/2016
5.0.8 3,302 2/15/2016
5.0.7 3,229 1/27/2016
5.0.7-RC2 3,220 12/8/2015
5.0.7-RC 3,290 9/10/2015
5.0.6 3,853 7/3/2015
5.0.5 3,591 4/23/2015
5.0.4 3,340 3/19/2015
5.0.4-RC 3,482 2/25/2015
5.0.3 4,523 10/31/2014
5.0.2 3,484 9/11/2014
5.0.1 3,629 8/21/2014
5.0.0-RC2 3,272 8/1/2014
5.0.0-RC 3,221 7/21/2014
5.0.0-Beta-3 3,190 5/28/2014
5.0.0-Beta-2 3,360 2/28/2014
5.0.0-Beta-1 3,170 11/14/2013
4.6.9 3,429 7/3/2015
4.6.8 3,409 8/1/2014
4.6.7 3,336 6/23/2014
4.6.6 3,688 4/9/2014
4.6.5 3,774 1/7/2014
4.6.4 3,776 9/30/2013
4.6.4-RC 2,158 8/5/2013
4.6.3 4,140 2/4/2013
4.6.2 4,002 11/28/2012
4.6.1 3,636 11/16/2012
4.6.0 19,267 10/5/2012
4.6.0-RC 2,131 10/1/2012
4.6.0-Beta-3 2,124 9/14/2012
4.6.0-Beta-2 2,142 7/13/2012
4.5.8 3,003 9/30/2013
4.5.8-RC 1,863 8/5/2013
4.5.7 3,065 2/4/2013
4.5.6 3,475 11/16/2012
4.5.5 3,454 10/5/2012
4.5.5-RC 2,055 10/1/2012
4.5.4 3,512 8/11/2012
4.5.4-RC2 1,991 8/3/2012
4.5.4-RC 2,033 7/13/2012
4.5.3 3,600 7/2/2012
4.5.3-RC4 1,992 6/22/2012
4.5.3-RC3 2,089 6/14/2012
4.5.3-RC2 2,045 6/4/2012
4.5.3-RC 2,150 5/12/2012
4.5.2 3,432 5/10/2012
4.5.1 12,529 5/5/2012
4.5.1-RC2 2,066 5/2/2012
4.5.1-RC 2,044 4/23/2012