Iskra.Core.DataBase 1.0.123

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.123
                    
NuGet\Install-Package Iskra.Core.DataBase -Version 1.0.123
                    
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.123" />
                    
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.123" />
                    
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.123
                    
#r "nuget: Iskra.Core.DataBase, 1.0.123"
                    
#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.123
                    
#: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.123
                    
Install as a Cake Addin
#tool nuget:?package=Iskra.Core.DataBase&version=1.0.123
                    
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 232 12/16/2025
1.0.135 87 12/12/2025
1.0.134 308 11/17/2025
1.0.133 295 11/17/2025
1.0.132 212 11/14/2025
1.0.131 152 11/6/2025
1.0.130 156 11/5/2025
1.0.129 126 10/31/2025
1.0.128 128 10/31/2025
1.0.127 130 10/31/2025
1.0.126 139 10/21/2025
1.0.125 132 10/16/2025
1.0.124 108 9/26/2025
1.0.123 152 9/24/2025
1.0.122 203 8/28/2025
1.0.121 219 8/26/2025
1.0.120 284 8/25/2025
1.0.119 142 8/21/2025
1.0.118 144 8/19/2025
1.0.117 141 8/18/2025
1.0.116 153 8/12/2025
1.0.115 120 7/11/2025
1.0.114 119 7/11/2025
1.0.113 125 7/11/2025
1.0.112 152 7/10/2025
1.0.111 153 6/18/2025
1.0.110 235 6/9/2025
1.0.109 162 6/3/2025
1.0.108 160 5/26/2025
1.0.107 159 5/26/2025
1.0.105 123 5/23/2025
1.0.104 184 5/22/2025
1.0.102 326 4/16/2025
1.0.101 208 4/16/2025
1.0.100 193 4/16/2025
1.0.99 241 4/16/2025
1.0.98 206 4/15/2025
1.0.97 228 4/14/2025
1.0.96 205 4/14/2025
1.0.95 198 4/14/2025
1.0.94 280 4/1/2025
1.0.93 159 4/1/2025
1.0.92 175 3/27/2025
1.0.91 151 3/26/2025
1.0.90 479 3/26/2025
1.0.89 484 3/25/2025
1.0.88 486 3/25/2025
1.0.86 188 3/19/2025
1.0.85 161 3/19/2025
1.0.84 159 3/13/2025
1.0.83 172 3/13/2025
1.0.82 173 3/12/2025
1.0.81 171 3/12/2025
1.0.80 168 3/12/2025
1.0.79 216 3/6/2025
1.0.78 207 3/6/2025
1.0.77 241 3/6/2025
1.0.76 210 3/6/2025
1.0.75 264 3/3/2025
1.0.74 196 2/27/2025
1.0.73 159 2/27/2025
1.0.72 152 2/27/2025
1.0.71 156 2/26/2025
1.0.70 148 2/26/2025
1.0.69 146 2/26/2025
1.0.68 151 2/26/2025