Stormancer.Server.Plugins.Database.EntityFrameworkCore 0.1.0.16-pre

This is a prerelease version of Stormancer.Server.Plugins.Database.EntityFrameworkCore.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Stormancer.Server.Plugins.Database.EntityFrameworkCore --version 0.1.0.16-pre
                    
NuGet\Install-Package Stormancer.Server.Plugins.Database.EntityFrameworkCore -Version 0.1.0.16-pre
                    
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="Stormancer.Server.Plugins.Database.EntityFrameworkCore" Version="0.1.0.16-pre" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Stormancer.Server.Plugins.Database.EntityFrameworkCore" Version="0.1.0.16-pre" />
                    
Directory.Packages.props
<PackageReference Include="Stormancer.Server.Plugins.Database.EntityFrameworkCore" />
                    
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 Stormancer.Server.Plugins.Database.EntityFrameworkCore --version 0.1.0.16-pre
                    
#r "nuget: Stormancer.Server.Plugins.Database.EntityFrameworkCore, 0.1.0.16-pre"
                    
#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.
#addin nuget:?package=Stormancer.Server.Plugins.Database.EntityFrameworkCore&version=0.1.0.16-pre&prerelease
                    
Install Stormancer.Server.Plugins.Database.EntityFrameworkCore as a Cake Addin
#tool nuget:?package=Stormancer.Server.Plugins.Database.EntityFrameworkCore&version=0.1.0.16-pre&prerelease
                    
Install Stormancer.Server.Plugins.Database.EntityFrameworkCore as a Cake Tool

Entity framework core

The entity framework core plugin provides access to an extensible Entity framework DB context configured through the app configuration and additional plugins.

Migrations

Migrations are used to generate SQL scripts that initialize then update the database schema whenever it needs to be updated by application changes.

Migrations are generated by using the EF core migration tool. To integrate with the tool, the app has to provide an implementation of IDesignTimeDbContextFactory<AppDbContext>. https://learn.microsoft.com/en-us/ef/core/cli/dbcontext-creation?tabs=dotnet-core-cli#from-a-design-time-factory

Create a file named dbContextFactory.cs in the application project.

Add the following code in it:

    public class DbContextFactory: IDesignTimeDbContextFactory<AppDbContext>
    {
        public AppDbContext CreateDbContext(string[] args)
        {
        var host = ServerApplication.CreateUnconnectedHost(builder => builder.AddAllStartupActions());
        var scope = host.DependencyResolver.CreateChild(Stormancer.Server.Plugins.API.Constants.ApiRequestTag);

        return scope.Resolve<DbContextAccessor>().GetDbContextAsync().Result;
        }
    }
Product Compatible and additional computed target framework versions.
.NET 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 (6)

Showing the top 5 NuGet packages that depend on Stormancer.Server.Plugins.Database.EntityFrameworkCore:

Package Downloads
Stormancer.Server.Plugins.GameHistory

Game history system for Stormancer server applications.

Stormancer.Server.Plugins.Collections

Adds a "collection system" to games using Stormancer.

Stormancer.Server.Plugins.PlayerReports

Adds a way for players to report other players, with a custom context.

Stormancer.Server.Plugins.Database.EntityFrameworkCore.Npgsql

Configures the Entity framework module to use the PostgreSQL driver (npgsql).

Stormancer.Server.Plugins.Users.EntityFramework

Saves Stormancer users using Entity framework core

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.1.0.18-pre 218 5/15/2025
0.1.0.17-pre 114 5/9/2025
0.1.0.16-pre 232 3/13/2025
0.1.0.15 236 3/3/2025
0.1.0.15-pre 186 3/3/2025
0.1.0.14-pre 770 6/10/2024
0.1.0.12-pre 163 3/11/2024
0.1.0.11-pre 868 11/20/2023
0.1.0.10-pre 1,009 10/13/2023
0.1.0.9-pre 586 10/5/2023
0.1.0.8-pre 1,031 8/22/2023
0.1.0-pre 399 8/14/2023

Fixed
*****
- Fixed an issue that prevented DbContextAccessor instances from being created by the dependency container.