Iskra.Core.DataBase 1.0.94

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.94
                    
NuGet\Install-Package Iskra.Core.DataBase -Version 1.0.94
                    
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.94" />
                    
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.94" />
                    
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.94
                    
#r "nuget: Iskra.Core.DataBase, 1.0.94"
                    
#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.94
                    
#: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.94
                    
Install as a Cake Addin
#tool nuget:?package=Iskra.Core.DataBase&version=1.0.94
                    
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.125 0 10/16/2025
1.0.124 88 9/26/2025
1.0.123 124 9/24/2025
1.0.122 175 8/28/2025
1.0.121 193 8/26/2025
1.0.120 263 8/25/2025
1.0.119 119 8/21/2025
1.0.118 120 8/19/2025
1.0.117 118 8/18/2025
1.0.116 127 8/12/2025
1.0.115 98 7/11/2025
1.0.114 94 7/11/2025
1.0.113 98 7/11/2025
1.0.112 127 7/10/2025
1.0.111 129 6/18/2025
1.0.110 213 6/9/2025
1.0.109 135 6/3/2025
1.0.108 137 5/26/2025
1.0.107 133 5/26/2025
1.0.105 100 5/23/2025
1.0.104 156 5/22/2025
1.0.102 306 4/16/2025
1.0.101 184 4/16/2025
1.0.100 168 4/16/2025
1.0.99 209 4/16/2025
1.0.98 182 4/15/2025
1.0.97 205 4/14/2025
1.0.96 179 4/14/2025
1.0.95 170 4/14/2025
1.0.94 258 4/1/2025
1.0.93 140 4/1/2025
1.0.92 155 3/27/2025
1.0.91 124 3/26/2025
1.0.90 458 3/26/2025
1.0.89 460 3/25/2025
1.0.88 466 3/25/2025
1.0.86 164 3/19/2025
1.0.85 135 3/19/2025
1.0.84 135 3/13/2025
1.0.83 145 3/13/2025
1.0.82 149 3/12/2025
1.0.81 142 3/12/2025
1.0.80 149 3/12/2025
1.0.79 192 3/6/2025
1.0.78 188 3/6/2025
1.0.77 221 3/6/2025
1.0.76 191 3/6/2025
1.0.75 244 3/3/2025
1.0.74 175 2/27/2025
1.0.73 135 2/27/2025
1.0.72 133 2/27/2025
1.0.71 135 2/26/2025
1.0.70 129 2/26/2025
1.0.69 130 2/26/2025
1.0.68 132 2/26/2025