Stormancer.Server.Plugins.Database.EntityFrameworkCore
0.1.0.15-pre
See the version list below for details.
dotnet add package Stormancer.Server.Plugins.Database.EntityFrameworkCore --version 0.1.0.15-pre
NuGet\Install-Package Stormancer.Server.Plugins.Database.EntityFrameworkCore -Version 0.1.0.15-pre
<PackageReference Include="Stormancer.Server.Plugins.Database.EntityFrameworkCore" Version="0.1.0.15-pre" />
paket add Stormancer.Server.Plugins.Database.EntityFrameworkCore --version 0.1.0.15-pre
#r "nuget: Stormancer.Server.Plugins.Database.EntityFrameworkCore, 0.1.0.15-pre"
// Install Stormancer.Server.Plugins.Database.EntityFrameworkCore as a Cake Addin #addin nuget:?package=Stormancer.Server.Plugins.Database.EntityFrameworkCore&version=0.1.0.15-pre&prerelease // Install Stormancer.Server.Plugins.Database.EntityFrameworkCore as a Cake Tool #tool nuget:?package=Stormancer.Server.Plugins.Database.EntityFrameworkCore&version=0.1.0.15-pre&prerelease
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 dabatase 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 | Versions 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. |
-
net8.0
- Microsoft.EntityFrameworkCore (>= 8.0.6)
- Microsoft.EntityFrameworkCore.Design (>= 8.0.6)
- Microsoft.EntityFrameworkCore.Relational (>= 8.0.6)
- Stormancer.Abstractions.Server (>= 10.1.1)
- Stormancer.Server.Plugins.Annotations (>= 1.1.0.1-pre)
- Stormancer.Server.Plugins.Api (>= 3.2.0.2-pre)
- Stormancer.Server.Plugins.Configuration (>= 2.1.4-pre)
- Stormancer.Server.Plugins.WebApi (>= 3.2.0.4-pre)
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.15 | 5 | 3/3/2025 |
0.1.0.15-pre | 7 | 3/3/2025 |
0.1.0.14-pre | 671 | 6/10/2024 |
0.1.0.12-pre | 78 | 3/11/2024 |
0.1.0.11-pre | 546 | 11/20/2023 |
0.1.0.10-pre | 802 | 10/13/2023 |
0.1.0.9-pre | 458 | 10/5/2023 |
0.1.0.8-pre | 746 | 8/22/2023 |
0.1.0-pre | 351 | 8/14/2023 |
Changed
*******
- Update dependencies to release version