AspNetForge.WebCore 1.0.0

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

AspNetForge.WebCore

Class Library для ASP.NET Core Minimal API (.NET 8).

Возможности

  • MapCrud<TEntity, TContext>(this WebApplication app, string route) — создаёт 5 стандартных эндпоинтов: GET, GET by id, POST, PUT, DELETE.
  • UseForgeResources(this WebApplication app, bool overwrite = false) — распаковывает встроенные JS/CSS/HTML в wwwroot приложения.
  • В комплект пакета входит полный пример проекта в contentFiles — при установке в целевой проект копируются Models.cs, Program.cs и wwwroot/.

Установка

dotnet add package AspNetForge.WebCore --version 1.0.0

После установки обязательно добавьте провайдер БД (пакет НЕ включает эти зависимости):

dotnet add package Npgsql.EntityFrameworkCore.PostgreSQL --version 8.0.11

Если нужны JWT или Identity, установите их отдельно.

Использование

using AspNetForge.Web.Extensions;

var app = builder.Build();

app.UseForgeResources(overwrite: true);
app.UseDefaultFiles();
app.UseStaticFiles();

app.MapCrud<ProductType, AppDbContext>("/api/producttypes");
app.MapCrud<MaterialType, AppDbContext>("/api/materialtypes");
app.MapCrud<Product, AppDbContext>("/api/products");
app.MapCrud<Partner, AppDbContext>("/api/partners");

app.Run();

Сборка пакета

cd tmp/AspNetForge.Web
dotnet build -c Release

.nupkg появится в bin/Release/.

Структура пакета

lib/net8.0/AspNetForge.WebCore.dll
build/AspNetForge.WebCore.targets
contentFiles/any/any/Sample/Models.cs
contentFiles/any/any/Sample/Program.cs
contentFiles/any/any/Sample/appsettings.json
contentFiles/any/any/Sample/wwwroot/...

build/AspNetForge.WebCore.targets копирует файлы примера из пакета в целевой проект при сборке. appsettings.json копируется только если его ещё нет в проекте — добавьте строку подключения к PostgreSQL вручную.

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.
  • net8.0

    • No dependencies.

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
1.1.0 128 6/15/2026
1.0.9 120 6/14/2026
1.0.8 116 6/14/2026
1.0.7 116 6/14/2026
1.0.6 112 6/14/2026
1.0.5 116 6/14/2026
1.0.4 114 6/14/2026
1.0.3 116 6/13/2026
1.0.2 119 6/12/2026
1.0.1 119 6/12/2026
1.0.0 115 6/12/2026