kr.bbon.Data 1.1.1

.NET 6.0
NuGet\Install-Package kr.bbon.Data -Version 1.1.1
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.
dotnet add package kr.bbon.Data --version 1.1.1
<PackageReference Include="kr.bbon.Data" Version="1.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add kr.bbon.Data --version 1.1.1
#r "nuget: kr.bbon.Data, 1.1.1"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install kr.bbon.Data as a Cake Addin
#addin nuget:?package=kr.bbon.Data&version=1.1.1

// Install kr.bbon.Data as a Cake Tool
#tool nuget:?package=kr.bbon.Data&version=1.1.1

kr.bbon.Data Package

publish to nuget

πŸ“’ Overview

🌈 Namespace

kr.bbon.Data

DbContext 기반이 λ˜λŠ” AppDbContextBase ν΄λž˜μŠ€μ™€ IEntityTypeConfiguration μΈν„°νŽ˜μ΄μŠ€ 일뢀가 κ΅¬ν˜„λœ EntityTypeConfigurationBase 클래슀λ₯Ό μ œκ³΅ν•©λ‹ˆλ‹€.

AppDbContextBase λŠ” Soft deletion 을 μ§€μ›ν•˜λŠ” 엔티티에 λŒ€ν•œ 처리 등이 ν¬ν•¨λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€.

μž‘μ„±ν•˜λ €λŠ” DbContext ν΄λž˜μŠ€λŠ” AppDbContextBase 클래슀 기반으둜 ν•„μš”ν•œ κΈ°λŠ₯을 ν™•μž₯ν•©λ‹ˆλ‹€.

EntityTypeConfigurationBase λŠ” kr.bbon.Data.Abstractions.Entities λ„€μž„μŠ€νŽ˜μ΄μŠ€μ—μ„œ μ œκ³΅λ˜λŠ” ν˜•μ‹μœΌλ‘œ κ΅¬ν˜„ λ˜λŠ” ν™•μž₯된 엔티티에 λŒ€ν•œ IEntityTypeConfiguration μΈν„°νŽ˜μ΄μŠ€μ˜ 일뢀 κ΅¬ν˜„μ΄ μ œκ³΅λ©λ‹ˆλ‹€.

kr.bbon.Data.Repositories

kr.bbon.Data.Abstractions.IRepository μΈν„°νŽ˜μ΄μŠ€λ₯Ό κ΅¬ν˜„ν•˜λŠ” λ ˆν¬μ§€ν† λ¦¬ ν΄λž˜μŠ€κ°€ μ œκ³΅λ©λ‹ˆλ‹€.

데이터 쿼리λ₯Ό μœ„ν•œ κΈ°λŠ₯은 Specification νŒ¨ν„΄μ„ μ‚¬μš©ν•˜κ²Œ μ€€λΉ„λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€.

kr.bbon.Data.Services

Unit of work κ΅¬ν˜„μ˜ μ €μ˜ 해석에 λŒ€ν•œ DataServiceBase ν΄λž˜μŠ€κ°€ μ œκ³΅λ©λ‹ˆλ‹€.

IRepository μΈν„°νŽ˜μ΄μŠ€μ˜ κ΅¬ν˜„ ν˜•μ‹μ„ ν•„λ“œλ‘œ μΆ”κ°€ν•΄μ„œ μ‚¬μš©ν•©λ‹ˆλ‹€.

kr.bbon.Data.Extensions.DependencyInjection

μ˜μ‘΄μ„± ꡬ성을 μœ„ν•œ IServiceCollection ν™•μž₯κ³Ό Specification νŒ¨ν„΄ κ΅¬ν˜„μ„ μœ„ν•œ IQueryable ν™•μž₯이 μ œκ³΅λ©λ‹ˆλ‹€.

🎯 Features

AppDbContextBase

DbContext 기반 ν΄λž˜μŠ€μž…λ‹ˆλ‹€.

DbSet<TEntity> ν•„λ“œλ₯Ό μΆ”κ°€ν•˜κ³ , OnModelCreating λ©”μ„œλ“œλ₯Ό μž¬μ •μ˜ν•΄μ„œ EntityTypeConfiguration 이 κ΅¬ν˜„λœ μ–΄μ…ˆλΈ”λ¦¬λ₯Ό ν™œμš©ν•˜κ²Œ κ³„νšλ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€.

EntityTypeConfigurationBase

kr.bbon.Data.Abstractions.Entities λ„€μž„μŠ€νŽ˜μ΄μŠ€μ— μ€€λΉ„λœ μ—”ν‹°ν‹° 기반 ν˜•μ‹μœΌλ‘œ μ—”ν‹°ν‹° 클래슀λ₯Ό μ •μ˜ν•˜λ©΄, 미리 μ •μ˜λœ κΈ°λŠ₯에 λŒ€ν•œ μ—”ν‹°ν‹° ν˜•μ‹ κ΅¬μ„±μ˜ μ€€λΉ„λœ ꡬ성을 μ œκ³΅ν•©λ‹ˆλ‹€.

RepositoryBase

λ ˆν¬μ§€ν† λ¦¬ νŒ¨ν„΄μ„ κ΅¬ν˜„ν•˜λŠ” 기반 클래슀λ₯Ό μ œκ³΅ν•©λ‹ˆλ‹€.

데이터 좜λ ₯은 Specification νŒ¨ν„΄μœΌλ‘œ 쿼리λ₯Ό μ •μ˜ν•  수 있게 SpecificationBase 클래슀λ₯Ό μ‚¬μš©ν•©λ‹ˆλ‹€.

데이터 μž…λ ₯은 EntityFrameworkCore의 κΈ°λ³Έ κΈ°λŠ₯을 μ‚¬μš©ν•˜λ©°, νŠΉμ΄μ‚¬ν•­μ€ μ—†μŠ΅λ‹ˆλ‹€.

DataServiceBase

Unit of work κ΅¬ν˜„μ— λŒ€ν•œ μ €μ˜ ν•΄μ„μœΌλ‘œ 기반 클래슀λ₯Ό μ œκ³΅ν•©λ‹ˆλ‹€.

데이터 μ²˜λ¦¬μ— ν•„μš”ν•œ Repository λŠ” μƒμ„±μž μ£Όμž…μœΌλ‘œ κ΅¬μ„±ν•˜κ³ , 각 Repository λŠ” ν•„λ“œλ‘œ μ •μ˜ν•΄μ„œ μ™ΈλΆ€μ—μ„œ μ ‘κ·Όν•  수 있게 κ΅¬ν˜„ν•˜κ²Œ μ€€λΉ„λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€.

DataService 에 DbContext κ°€ μžˆμ–΄, μ—¬λŸ¬ μ €μž₯μ†Œμ˜ νŠΈλžœμž­μ…˜μ„ ν•˜λ‚˜λ‘œ μ²˜λ¦¬ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

DataServie κ΅¬ν˜„ ν”„λ‘œμ νŠΈμ™€ 도메인 κΈ°λŠ₯ ν”„λ‘œμ νŠΈλ₯Ό 뢄리할 수 있게 κ΅¬μ„±ν•˜λŠ” 것을 μΆ”μ²œν•©λ‹ˆλ‹€.

μ°Έμ‘°

μ†”λ£¨μ…˜μ„ μ—΄κ³ , Example1 μ†”λ£¨μ…˜ λ””λ ‰ν„°λ¦¬μ˜ ν”„λ‘œμ νŠΈλ₯Ό ν™•μΈν•˜μ‹­μ‹œμ˜€.

Product Versions
.NET net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
Compatible target framework(s)
Additional computed target framework(s)
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.1 105 6/27/2022
1.1.0 68 6/27/2022
1.0.0 113 1/22/2022
1.0.0-alpha.8 72 1/22/2022
1.0.0-alpha.7 62 1/22/2022
1.0.0-alpha.4 69 1/22/2022
1.0.0-alpha.3 84 1/2/2022
1.0.0-alpha.2 77 1/2/2022
1.0.0-alpha.1 83 1/1/2022