Iskra.Core.DataBase 1.0.136

dotnet add package Iskra.Core.DataBase --version 1.0.136
                    
NuGet\Install-Package Iskra.Core.DataBase -Version 1.0.136
                    
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.136" />
                    
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.136" />
                    
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.136
                    
#r "nuget: Iskra.Core.DataBase, 1.0.136"
                    
#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.136
                    
#: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.136
                    
Install as a Cake Addin
#tool nuget:?package=Iskra.Core.DataBase&version=1.0.136
                    
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 225 12/16/2025
1.0.135 78 12/12/2025
1.0.134 305 11/17/2025
1.0.133 291 11/17/2025
1.0.132 205 11/14/2025
1.0.131 148 11/6/2025
1.0.130 151 11/5/2025
1.0.129 122 10/31/2025
1.0.128 122 10/31/2025
1.0.127 126 10/31/2025
1.0.126 135 10/21/2025
1.0.125 127 10/16/2025
1.0.124 104 9/26/2025
1.0.123 145 9/24/2025
1.0.122 199 8/28/2025
1.0.121 214 8/26/2025
1.0.120 278 8/25/2025
1.0.119 139 8/21/2025
1.0.118 140 8/19/2025
1.0.117 136 8/18/2025
1.0.116 146 8/12/2025
1.0.115 116 7/11/2025
1.0.114 114 7/11/2025
1.0.113 121 7/11/2025
1.0.112 148 7/10/2025
1.0.111 148 6/18/2025
1.0.110 231 6/9/2025
1.0.109 156 6/3/2025
1.0.108 156 5/26/2025
1.0.107 155 5/26/2025
1.0.105 120 5/23/2025
1.0.104 179 5/22/2025
1.0.102 323 4/16/2025
1.0.101 203 4/16/2025
1.0.100 188 4/16/2025
1.0.99 237 4/16/2025
1.0.98 204 4/15/2025
1.0.97 225 4/14/2025
1.0.96 198 4/14/2025
1.0.95 189 4/14/2025
1.0.94 275 4/1/2025
1.0.93 154 4/1/2025
1.0.92 171 3/27/2025
1.0.91 145 3/26/2025
1.0.90 476 3/26/2025
1.0.89 476 3/25/2025
1.0.88 482 3/25/2025
1.0.86 182 3/19/2025
1.0.85 155 3/19/2025
1.0.84 154 3/13/2025
1.0.83 170 3/13/2025
1.0.82 167 3/12/2025
1.0.81 162 3/12/2025
1.0.80 162 3/12/2025
1.0.79 211 3/6/2025
1.0.78 201 3/6/2025
1.0.77 237 3/6/2025
1.0.76 209 3/6/2025
1.0.75 260 3/3/2025
1.0.74 191 2/27/2025
1.0.73 154 2/27/2025
1.0.72 146 2/27/2025
1.0.71 152 2/26/2025
1.0.70 145 2/26/2025
1.0.69 142 2/26/2025
1.0.68 150 2/26/2025