Xtensive.Orm.Web
6.0.13
See the version list below for details.
dotnet add package Xtensive.Orm.Web --version 6.0.13
NuGet\Install-Package Xtensive.Orm.Web -Version 6.0.13
<PackageReference Include="Xtensive.Orm.Web" Version="6.0.13" />
paket add Xtensive.Orm.Web --version 6.0.13
#r "nuget: Xtensive.Orm.Web, 6.0.13"
// Install Xtensive.Orm.Web as a Cake Addin #addin nuget:?package=Xtensive.Orm.Web&version=6.0.13 // Install Xtensive.Orm.Web as a Cake Tool #tool nuget:?package=Xtensive.Orm.Web&version=6.0.13
Xtensive.Orm.Web
Summary
The extension adds integration for DataObjects.Net Core and ASP.NET Core. It contains SessionManager class which is middleware and can be used as part of ASP.NET Core Pipeline. SessionManager opens session and transaction on going down the pipeline and disposes them on going up the pipeline.
SessionManager has the following features:
- When Session.Current is accessed, and there is no current Session, it will provide a new instance of Session. In that case a new transaction will be created. It will be committed when the pipeline execution returns to SessionManager without any exception, otherwise it will be rolled back.
- Setting SessionManager.Demand().HasErrors to true will lead to rollback of this transaction.
- SessionManager.Current (and SessionManager.Demand()) returns the instance of SessionManager bound to the current pipeline execution, i.e. current SessionManager. Its Session property (if not null) is the same value as the one provided by Session.Current.
Note that presence of SessionManager does not prevent you from creating Sessions manually. It operates relying on Session.Resolver event, which is raised only when there is no current Session.
Finally, no automatic Session + transaction will be provided, if you don't use Session.Current/Session.Demand() methods in your code (directly or indirectly). So e.g. requests to static web pages won't lead to any DB interaction.
Prerequisites
DataObjects.Net 6.0.x or later (http://dataobjects.net)
Implementation
To start using SessionManager it should be added to ASP.NET Middleware pipeline in Startup class like in example below
public class Startup
{
public Startup(IConfiguration configuration)
{
}
public void ConfigureServices(IServiceCollection services)
{
// Configure services
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
// Configure parts of the pipeline which are before SessionManager.
// It will be unable to use SessionManager functionality in these parts
// For instance,
app.UseStaticFiles()
// Add session manager to the pipeline
app.UseSessionManager();
// Configure parts of the pipeline which are after SessionManager.
// These parts will work with SessionManager.
// For instance, MVC controllers will be able to query data using DataObjects.Net
app.UseMvc(routes =>
{
routes.MapRoute(
name: "default",
template: "{controller=Home}/{action=Index}/{id?}");
});
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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 was computed. 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. |
.NET Core | netcoreapp2.0 is compatible. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
-
.NETCoreApp 2.0
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- System.Configuration.ConfigurationManager (>= 4.7.0)
- Xtensive.Orm (>= 6.0.13)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
7.2.0-Beta-1 | 393 | 12/28/2023 |
7.1.2 | 110 | 10/18/2024 |
7.1.1 | 519 | 11/14/2023 |
7.1.0 | 843 | 4/12/2023 |
7.1.0-RC | 652 | 3/9/2023 |
7.1.0-Beta-2 | 718 | 12/19/2022 |
7.1.0-Beta-1 | 713 | 7/4/2022 |
7.0.5 | 100 | 6/3/2024 |
7.0.4 | 463 | 11/12/2023 |
7.0.3 | 1,119 | 3/21/2022 |
7.0.2 | 1,091 | 2/8/2022 |
7.0.1 | 982 | 10/29/2021 |
7.0.0 | 973 | 6/2/2021 |
6.0.13 | 132 | 4/4/2024 |
6.0.12 | 447 | 11/10/2023 |
6.0.11 | 883 | 1/12/2023 |
6.0.10 | 1,006 | 4/29/2022 |
6.0.9 | 1,043 | 2/2/2022 |
6.0.8 | 978 | 10/28/2021 |
6.0.7 | 958 | 8/27/2021 |
6.0.6 | 1,010 | 5/24/2021 |
6.0.5 | 1,063 | 3/9/2021 |
6.0.4 | 1,144 | 12/22/2020 |
6.0.3 | 1,131 | 9/29/2020 |
6.0.0 | 1,288 | 1/28/2020 |
5.1.0-Beta-1 | 4,987 | 1/30/2015 |
5.0.24 | 951 | 4/27/2021 |
5.0.23 | 1,025 | 2/4/2021 |
5.0.22 | 1,162 | 11/18/2020 |
5.0.21 | 1,146 | 11/6/2020 |
5.0.20 | 1,288 | 12/25/2019 |
5.0.19 | 1,349 | 5/30/2019 |
5.0.19-Beta-2 | 1,006 | 4/16/2019 |
5.0.19-Beta-1 | 1,113 | 12/29/2018 |
5.0.18 | 1,584 | 9/28/2018 |
5.0.18-Beta-3 | 1,307 | 7/2/2018 |
5.0.18-Beta-2 | 1,371 | 6/6/2018 |
5.0.18-Beta-1 | 1,405 | 4/24/2018 |
5.0.17 | 1,692 | 2/27/2018 |
5.0.17-Beta-3 | 1,375 | 2/12/2018 |
5.0.17-Beta-2 | 1,468 | 1/12/2018 |
5.0.17-Beta-1 | 1,479 | 12/28/2017 |
5.0.16 | 1,568 | 12/1/2017 |
5.0.16-Beta-1 | 1,327 | 9/27/2017 |
5.0.15 | 1,546 | 8/1/2017 |
5.0.14 | 1,655 | 6/19/2017 |
5.0.13 | 1,665 | 3/22/2017 |
5.0.12 | 1,700 | 2/14/2017 |
5.0.11 | 1,677 | 1/26/2017 |
5.0.11-RC2 | 1,430 | 12/16/2016 |
5.0.11-RC | 1,677 | 9/20/2016 |
5.0.10 | 1,708 | 8/5/2016 |
5.0.10-RC | 1,434 | 6/30/2016 |
5.0.9 | 4,014 | 3/3/2016 |
5.0.8 | 1,754 | 2/15/2016 |
5.0.7 | 1,734 | 1/27/2016 |
5.0.7-RC2 | 1,432 | 12/8/2015 |
5.0.7-RC | 1,501 | 9/10/2015 |
5.0.6 | 1,836 | 7/3/2015 |
5.0.5 | 1,945 | 4/23/2015 |
5.0.4 | 1,731 | 3/19/2015 |
5.0.4-RC | 1,800 | 2/25/2015 |
5.0.3 | 2,103 | 10/31/2014 |
5.0.2 | 1,820 | 9/11/2014 |
5.0.0 | 1,837 | 8/15/2014 |
5.0.0-RC2 | 1,503 | 8/1/2014 |
5.0.0-RC | 1,525 | 7/21/2014 |
5.0.0-Beta-3 | 1,509 | 5/28/2014 |
5.0.0-Beta-2 | 1,600 | 2/28/2014 |
5.0.0-Beta-1 | 1,614 | 11/14/2013 |
4.6.9 | 1,643 | 7/3/2015 |
4.6.8 | 1,797 | 8/1/2014 |
4.6.7 | 1,782 | 6/23/2014 |
4.6.6 | 1,969 | 4/9/2014 |
4.6.5 | 1,839 | 1/7/2014 |
4.6.4 | 1,985 | 9/30/2013 |
4.6.3 | 1,916 | 2/4/2013 |
4.6.2 | 2,176 | 11/28/2012 |
4.6.0 | 2,085 | 10/11/2012 |
4.6.0-RC | 1,739 | 10/4/2012 |
4.5.8 | 1,791 | 9/30/2013 |
4.5.7 | 1,765 | 2/4/2013 |
4.5.6 | 2,041 | 11/28/2012 |
4.5.5 | 1,972 | 10/11/2012 |
4.5.5-RC | 1,658 | 10/4/2012 |
4.5.3 | 2,232 | 8/6/2012 |
4.5.2 | 2,398 | 5/10/2012 |
4.5.0 | 2,106 | 3/13/2012 |