Iskra.Core.DataBase 1.0.132

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

Iskra.Core.DataBase

Обзор

Библиотека Iskra.Core.DataBase предоставляет набор инструментов для автоматического обновления атрибутов в базе данных при использовании Entity Framework Core (EFCore). Она включает перехватчики, которые управляют установкой даты создания (CreateDate), даты изменения (UpdateDate) и пользователя, который внес изменения (UpdateUserId). Библиотека также поддерживает отключение перехватчиков по необходимости.

Установка

Библиотеку можно установить через NuGet:

dotnet add package Iskra.Core.DataBase

Основные компоненты

Перехватчики (Interceptors)

  1. UpdateUserInterceptor

    • Описание: Устанавливает UpdateUserId для сущностей, реализующих интерфейс IUpdateAuditSecure.
  2. UpdateDateInterceptor

    • Описание: Устанавливает UpdateDate для сущностей, реализующих интерфейс IUpdateAudit.
  3. CreateDateInterceptor

    • Описание: Устанавливает CreateDate для сущностей, реализующих интерфейс ICreateAudit.
  4. CreateUserInterceptor

    • Описание: Устанавливает CreateUserId для сущностей, реализующих интерфейс ICreateAuditSecure.

Интерфейсы

  1. IUpdateAuditSecure

    • Описание: Содержит свойства UpdateUserId и UpdateDate.
    • Пример:
      public interface IUpdateAuditSecure : IUpdateAudit
      {
          Guid UpdateUserId { get; set; }
      }
      
  2. IUpdateAudit

    • Описание: Содержит свойство UpdateDate.
    • Пример:
      public interface IUpdateAudit
      {
          DateTime? UpdateDate { get; set; }
      }
      
  3. ICreateAudit

    • Описание: Содержит свойство CreateDate.
    • Пример:
      public interface ICreateAudit
      {
          DateTime CreateDate { get; set; }
      }
      
  4. ICreateAuditSecure

    • Описание: Содержит свойства CreateUserId и CreateDate.
    • Пример:
      public interface ICreateAuditSecure : ICreateAudit
      {
          Guid CreateUserId { get; set; }
      }
      

Атрибуты

  1. SuppressUpdateDateInterceptorAttribute

    • Описание: Подавляет перехватчик UpdateDateInterceptor.
    • Пример:
      [SuppressUpdateDateInterceptor("Reason for suppression")]
      public class MyEntity : IUpdateAuditSecure
      {
          // Entity properties
      }
      
  2. SuppressCreateDateInterceptorAttribute

    • Описание: Подавляет перехватчик CreateDateInterceptor.
    • Пример:
      [SuppressCreateDateInterceptor("Reason for suppression")]
      public class MyEntity : ICreateAudit
      {
          // Entity properties
      }
      

Заключение

Библиотека Iskra.Core.DataBase упрощает управление атрибутами аудита в базе данных, автоматизируя процесс установки даты создания и изменения, а также пользователя, который внес изменения. Она предоставляет гибкость для отключения перехватчиков по необходимости, что позволяет адаптировать библиотеку под различные требования проекта.

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.136 230 12/16/2025
1.0.135 84 12/12/2025
1.0.134 307 11/17/2025
1.0.133 293 11/17/2025
1.0.132 211 11/14/2025
1.0.131 151 11/6/2025
1.0.130 153 11/5/2025
1.0.129 124 10/31/2025
1.0.128 126 10/31/2025
1.0.127 128 10/31/2025
1.0.126 135 10/21/2025
1.0.125 130 10/16/2025
1.0.124 105 9/26/2025
1.0.123 146 9/24/2025
1.0.122 200 8/28/2025
1.0.121 218 8/26/2025
1.0.120 281 8/25/2025
1.0.119 141 8/21/2025
1.0.118 142 8/19/2025
1.0.117 140 8/18/2025
1.0.116 150 8/12/2025
1.0.115 118 7/11/2025
1.0.114 118 7/11/2025
1.0.113 125 7/11/2025
1.0.112 149 7/10/2025
1.0.111 151 6/18/2025
1.0.110 233 6/9/2025
1.0.109 160 6/3/2025
1.0.108 158 5/26/2025
1.0.107 156 5/26/2025
1.0.105 120 5/23/2025
1.0.104 182 5/22/2025
1.0.102 325 4/16/2025
1.0.101 206 4/16/2025
1.0.100 191 4/16/2025
1.0.99 239 4/16/2025
1.0.98 205 4/15/2025
1.0.97 227 4/14/2025
1.0.96 203 4/14/2025
1.0.95 196 4/14/2025
1.0.94 280 4/1/2025
1.0.93 158 4/1/2025
1.0.92 174 3/27/2025
1.0.91 147 3/26/2025
1.0.90 477 3/26/2025
1.0.89 481 3/25/2025
1.0.88 484 3/25/2025
1.0.86 186 3/19/2025
1.0.85 156 3/19/2025
1.0.84 159 3/13/2025
1.0.83 171 3/13/2025
1.0.82 171 3/12/2025
1.0.81 168 3/12/2025
1.0.80 167 3/12/2025
1.0.79 211 3/6/2025
1.0.78 203 3/6/2025
1.0.77 239 3/6/2025
1.0.76 210 3/6/2025
1.0.75 261 3/3/2025
1.0.74 196 2/27/2025
1.0.73 158 2/27/2025
1.0.72 150 2/27/2025
1.0.71 155 2/26/2025
1.0.70 146 2/26/2025
1.0.69 145 2/26/2025
1.0.68 150 2/26/2025