BugFree.Controllers.Core 1.1.2026.121-beta1424

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

BugFree.Controllers.Core

BugFree.Controllers.Core �ṩ Web API �������Ļ�����������Ҫ���ڿ��ٹ���ͳһ���Ľӿڣ�

  • ͳһ��Ӧģ�ͣ�Response + ResponseCode
  • ���������ࣺBugFreeControllerBase
  • ͨ��ʵ���������ReadOnlyEntityController<TEntity> / EntityController<TEntity, TModel>
  • ��ȫ���أ�HeaderSignatureService��SecurityPolicyService
  • ��ȫ��Ӧͷ��CspMiddleware

Ŀ���ܣ�net8.0��net10.0

��װ������

������ Web ��Ŀ�����ø���Ŀ��ProjectReference �� NuGet �������������ʱע�᣺

  • ServiceCollectionExtensions.AddCoreService

����չ��ǰ��ע�� IMemoryCache����ǩ���طű������ؼ���ʹ�á�

·��Լ��

BugFreeControllerBase Ĭ��·�ɣ�

  • api/[area]/v{version:apiVersion}/[controller]/[action]

�����ã�

  • ApiController
  • Authorize
  • ApiVersion("1.0")

ͳһ��Ӧ

�������ڿ�ʹ�ã�

  • Success() / SuccessAsync()������ ResponseCode.Success
  • Fail() / FailAsync()������ ResponseCode.Fail

Response.Data Ϊ�ַ�������֤ǰ���ڲ�ͬ������̬����һ�µ����ѷ�ʽ�����ı��� JSON �ַ�������

ʵ�������

  • QueryEntityController<TEntity>���б��ѯ������ + ��ҳ��
  • GetEntityController<TEntity>������������ѯ
  • EntityController<TEntity, TModel>������/����/���������/ɾ��

ʵ���������� XCode �� Entity<TEntity>/IEntityFactory�����Գ����ֶΣ�����ʱ�䡢�����˵ȣ�����Ĭ���ų�������

ͷ��ǩ������ѡ��

HeaderSignatureService.ValidSignHeaders ����У���Զ��� XCa* ͷ��ǩ����������

  • ʱ�����Ч��У�飨Ĭ�� ��300 �룩
  • Nonce �طű�����IMemoryCache��Ĭ�� 5 ���ӣ�
  • ʧ�ܼ���������SecurityPolicyService��

������˵��

  • ����ĿΪ�����⣬�������ڹ��� API ������ƽ̨�ض����͡�
  • ���� public/protected ��Ա��Ӧ�����ȶ�ǩ���������ƻ��Ա����
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 is compatible.  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

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.2026.128-beta1507 63 1/28/2026
1.1.2026.121-beta1615 65 1/21/2026
1.1.2026.121-beta1424 61 1/21/2026
1.1.2026.121-beta1413 55 1/21/2026
1.1.2026.121-beta1401 55 1/21/2026
1.1.2026.121-beta1136 56 1/21/2026