asp.net.core.helper.core
1.1.0
See the version list below for details.
dotnet add package asp.net.core.helper.core --version 1.1.0
NuGet\Install-Package asp.net.core.helper.core -Version 1.1.0
<PackageReference Include="asp.net.core.helper.core" Version="1.1.0" />
paket add asp.net.core.helper.core --version 1.1.0
#r "nuget: asp.net.core.helper.core, 1.1.0"
// Install asp.net.core.helper.core as a Cake Addin #addin nuget:?package=asp.net.core.helper.core&version=1.1.0 // Install asp.net.core.helper.core as a Cake Tool #tool nuget:?package=asp.net.core.helper.core&version=1.1.0
asp.net.core.helper
asp.net.core.helper is a library to greatly reduce asp.net boilerplate code and lets you focus on your domain specific stuff.
Setup
Use Nuget Package Manager to install the package into your project:
Install-Package asp.net.core.helper.core
Usage
Startup.cs: As Last steps before you Map your endpoints, use MigrateDatabase and/or SeedDatabase to get the Package working.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
...
app.UseRouting();
app.MigrateDatabase<SampleContext>();
app.SeedDatabase<SampleContext>(typeof(Startup));
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
}
MigrateDatabase
Use this Extension to apply your EF Core Migrations properly
SeedDatabase
Supported database adapters: (Tested)
- Pomelo.EntityFrameworkCore.MySql (5.0.3) for MariaDb 10..6.4
Example Seed see UserSeed.cs
- L7: Inherit from BaseSeed with your Context as generic argument
- L10: Constructor to pass the Injected Context to the BaseClass
- L16: The unique Key of this seed
- L18: The Order in wich the seeds should be executed
- L20-36: This seed adds a default admin user to the Users Table
ToDo:
- NuGet
- CI / CD
- Document sources and sample
- Microsoft SQL Server IQueryProvider
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. 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. |
-
net5.0
- BCrypt.Net-Next (>= 4.0.2)
- Microsoft.AspNetCore.Mvc.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Mvc.Formatters.Json (>= 2.2.0)
- Microsoft.EntityFrameworkCore (>= 5.0.12)
- Microsoft.EntityFrameworkCore.Relational (>= 5.0.12)
- Microsoft.Extensions.DependencyInjection (>= 5.0.2)
- System.IdentityModel.Tokens.Jwt (>= 6.15.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.