Skip to main content

Ling.Audit by Jing Ling

Nuget / site data

Nuget GitHub last commit GitHub Repo stars

Details

Info

info

Name: Ling.Audit

A source generator for audit properties.

Author: Jing Ling

NuGet: https://www.nuget.org/packages/Ling.Audit/

You can find more details at https://github.com/ling921/dotnet-lib/

Source : https://github.com/ling921/dotnet-lib/

Original Readme

note

Introduction

This is a dotnet library repository that contains the following public libraries

ProjectPackageDescription
Ling.CacheNuGetA cache library that can easily use memory cache or redis cache.
Ling.AuditNuGetA source generator to generate audit properties.
Ling.EntityFrameworkCoreNuGetAn extension library of Microsoft.EntityFrameworkCore.
Ling.EntityFrameworkCore.AuditNuGetAn extension library that can automatically record entity changes of Microsoft.EntityFrameworkCore.
Ling.BlazorNuGetA library for Blazor.
Ling.Blazor.AuthenticationNuGetA library that provides JWT authentication for Blazor applications.

License

This project is licensed under the Apache-2.0

About

note

Generating audit data from class implementation of interfaces

How to use

Example ( source csproj, source files )

This is the CSharp Project that references Ling.Audit

<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Ling.Audit" Version="1.1.0" />
</ItemGroup>
<PropertyGroup>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<CompilerGeneratedFilesOutputPath>$(BaseIntermediateOutputPath)\GX</CompilerGeneratedFilesOutputPath>
</PropertyGroup>
</Project>

Generated Files

Those are taken from $(BaseIntermediateOutputPath)\GX

// <auto-generated/>

#nullable enable annotations
#nullable disable warnings

namespace LingDemo
{
partial class Person
{
/// <summary>
/// Gets or sets the creation time of this entity.
/// </summary>
public virtual global::System.DateTimeOffset CreationTime { get; set; }

/// <summary>
/// Gets or sets the creator Id of this entity.
/// </summary>
public virtual global::System.Nullable<global::System.Guid> CreatorId { get; set; }

/// <summary>
/// Gets or sets the last modification time of this entity.
/// </summary>
public virtual global::System.Nullable<global::System.DateTimeOffset> LastModificationTime { get; set; }

/// <summary>
/// Gets or sets the last modifier Id of this entity.
/// </summary>
public virtual global::System.Nullable<global::System.Guid> LastModifierId { get; set; }

/// <summary>
/// Gets or sets whether this entity is soft deleted.
/// </summary>
public virtual global::System.Boolean IsDeleted { get; set; }

/// <summary>
/// Gets or sets the deletion time of this entity.
/// </summary>
public virtual global::System.Nullable<global::System.DateTimeOffset> DeletionTime { get; set; }

/// <summary>
/// Get or set the deleter Id of this entity.
/// </summary>
public virtual global::System.Nullable<global::System.Guid> DeleterId { get; set; }
}
}

Usefull

Download Example (.NET C# )

Share Ling.Audit

https://ignatandrei.github.io/RSCG_Examples/v2/docs/Ling.Audit

In the same category (EnhancementClass) - 24 other generators

ApparatusAOT

AspectGenerator

CommonCodeGenerator

CopyTo

DudNet

FastGenericNew

GeneratorEquals

HsuSgSync

Immutype

Lombok.NET

M31.FluentAPI

MemoryPack

Meziantou.Polyfill

Microsoft.Extensions.Logging

Microsoft.Extensions.Options.Generators.OptionsValidatorGenerator

Microsoft.Interop.JavaScript.JSImportGenerator

OptionToStringGenerator

RSCG_Decorator

RSCG_UtilityTypes

StaticReflection

SyncMethodGenerator

System.Runtime.InteropServices

System.Text.RegularExpressions

TelemetryLogging