Azunt.ReasonManagement 1.0.3

dotnet add package Azunt.ReasonManagement --version 1.0.3
                    
NuGet\Install-Package Azunt.ReasonManagement -Version 1.0.3
                    
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="Azunt.ReasonManagement" Version="1.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Azunt.ReasonManagement" Version="1.0.3" />
                    
Directory.Packages.props
<PackageReference Include="Azunt.ReasonManagement" />
                    
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 Azunt.ReasonManagement --version 1.0.3
                    
#r "nuget: Azunt.ReasonManagement, 1.0.3"
                    
#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 Azunt.ReasonManagement@1.0.3
                    
#: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=Azunt.ReasonManagement&version=1.0.3
                    
Install as a Cake Addin
#tool nuget:?package=Azunt.ReasonManagement&version=1.0.3
                    
Install as a Cake Tool

Azunt.ReasonManagement

Azunt.ReasonManagement는 Reasons 테이블을 기준으로 이용 사유 이름(Name)과 상세 내용(Content)을 관리하는 재사용 가능한 .NET 모듈입니다.

이 리포지토리는 NuGet 패키지로 게시할 클래스 라이브러리인 Azunt.ReasonManagement와, 해당 패키지를 실제로 테스트할 수 있는 Blazor Server 프로젝트인 Azunt.Web을 함께 포함합니다.

포함 프로젝트

src/Azunt.ReasonManagement
│  Azunt.ReasonManagement.sln
│
├─Azunt.ReasonManagement
│      Azunt.ReasonManagement.csproj
│
├─Azunt.SqlServer
│      Azunt.SqlServer.sqlproj
│
└─Azunt.Web
       Azunt.Web.csproj

주요 특징

  • Reasons 테이블에 Content NVARCHAR(MAX) NULL 컬럼을 포함합니다.
  • Azunt.Web은 EF Core In-Memory DB를 사용하므로 SQL Server 데이터베이스 프로젝트를 게시하지 않아도 /Reasons 페이지에서 CRUD를 바로 테스트할 수 있습니다.
  • Dul.dllDulPager를 사용하지 않습니다.
  • ArticleSetFilterOptionsAzunt.ReasonManagement 패키지 내부의 경량 타입을 사용하므로 Dul.dll 없이 컴파일됩니다.
  • 페이징 UI는 Azunt.Components NuGet 패키지의 Azunt.Components.Paging.Pager 컴포넌트를 사용합니다.
  • 삭제 확인 창은 Azunt.Web 내부 인라인 모달로 구현하여 Del 버튼 클릭 후 삭제와 목록 갱신이 바로 동작하도록 구성했습니다.
  • Excel 다운로드는 EPPlus가 아니라 Microsoft Open XML SDK(DocumentFormat.OpenXml) 기반의 ReasonExcelExporter를 사용합니다.
  • 운영/배포 시에는 EF Core SQL Server, Dapper, ADO.NET 방식도 선택할 수 있습니다.

빠른 실행

Visual Studio에서 다음 솔루션을 엽니다.

src/Azunt.ReasonManagement/Azunt.ReasonManagement.sln

시작 프로젝트를 Azunt.Web으로 설정한 뒤 실행합니다.

실행 후 다음 URL로 이동합니다.

/Reasons

Azunt.Web은 다음 코드로 Reason 모듈을 In-Memory 모드로 등록합니다.

builder.Services.AddDependencyInjectionContainerForReasonApp(
    mode: ReasonServicesRegistrationExtensions.RepositoryMode.EfCoreInMemory);

따라서 SQL Server 데이터베이스 프로젝트를 게시하지 않아도 Create, Read, Update, Delete, Search, Sort, Paging, Excel Export를 바로 테스트할 수 있습니다.

NuGet 패키지 생성

클래스 라이브러리 패키지는 다음 명령으로 생성할 수 있습니다.

cd src/Azunt.ReasonManagement
dotnet pack Azunt.ReasonManagement/Azunt.ReasonManagement.csproj -c Release

생성된 .nupkg 파일을 NuGet 서버에 게시한 뒤, 실제 Azunt.Web 프로젝트에서 패키지 참조 방식으로 테스트하면 됩니다.

SQL Server 사용 예

운영 환경에서 SQL Server를 사용하려면 다음처럼 등록합니다.

var connectionString = builder.Configuration.GetConnectionString("DefaultConnection");

builder.Services.AddDependencyInjectionContainerForReasonApp(
    connectionString,
    ReasonServicesRegistrationExtensions.RepositoryMode.EfCoreSqlServer);

Dapper 또는 ADO.NET 모드도 같은 연결 문자열을 전달하여 사용할 수 있습니다.

이번 테스트 프로젝트 구성 메모

  • Azunt.Web.Client 프로젝트는 포함하지 않습니다.
  • Blazor Server의 InteractiveServer 렌더링만 사용합니다.
  • WebAssembly/Webcil 변환 경로에서 발생할 수 있는 tmp-webcil 관련 오류를 피하기 위해 Microsoft.AspNetCore.Components.WebAssembly.Server 참조와 AddInteractiveWebAssemblyComponents() 설정을 제거했습니다.
  • Azunt.WebAzunt.ReasonManagement 프로젝트를 직접 참조하여 NuGet 게시 전 로컬 테스트가 가능하고, 최종 게시 후에는 Project Reference를 Package Reference로 교체해 테스트할 수 있습니다.

Single Tenant and Multi Tenant Test Pages

The Azunt.Web test project includes two Reason management pages:

  • /Reasons: single-tenant test page using the default registered repository.
  • /ReasonsByTenant: multi-tenant style test page that reads the current tenant connection string from IUserService.GetUserNotCached().Tenant.ConnectionString.

For local testing, InMemoryUserService returns InMemory:AzuntReasonTenantDb, so the tenant page can run without SQL Server. In a real multi-tenant environment, replace the test IUserService with the application service that resolves the tenant SQL Server connection string from the current user or tenant table.

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

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.0.3 207 6/19/2026
1.0.2 754 6/18/2026
1.0.1 980 5/13/2025
1.0.0 320 5/13/2025