Skip to content

Commit

Permalink
Adding Audit.EntityFramework.Abstractions assembly to decouple doma…
Browse files Browse the repository at this point in the history
…in layer EntityFramework (#714)
  • Loading branch information
thepirat000 committed Nov 23, 2024
1 parent f317aed commit ee29440
Show file tree
Hide file tree
Showing 15 changed files with 89 additions and 3 deletions.
11 changes: 11 additions & 0 deletions Audit.NET.sln
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Audit.Polly.UnitTest", "tes
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Audit.NET.Channels", "src\Audit.NET.Channels\Audit.NET.Channels.csproj", "{5574EA92-47A5-4483-BF7E-89231D38D318}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Audit.EntityFramework.Abstractions", "src\Audit.EntityFramework.Abstractions\Audit.EntityFramework.Abstractions.csproj", "{C45B1DD0-7C1D-406D-BC44-B356AFA226DB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -717,6 +719,14 @@ Global
{5574EA92-47A5-4483-BF7E-89231D38D318}.Release|Any CPU.Build.0 = Release|Any CPU
{5574EA92-47A5-4483-BF7E-89231D38D318}.Release|x64.ActiveCfg = Release|Any CPU
{5574EA92-47A5-4483-BF7E-89231D38D318}.Release|x64.Build.0 = Release|Any CPU
{C45B1DD0-7C1D-406D-BC44-B356AFA226DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C45B1DD0-7C1D-406D-BC44-B356AFA226DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C45B1DD0-7C1D-406D-BC44-B356AFA226DB}.Debug|x64.ActiveCfg = Debug|Any CPU
{C45B1DD0-7C1D-406D-BC44-B356AFA226DB}.Debug|x64.Build.0 = Debug|Any CPU
{C45B1DD0-7C1D-406D-BC44-B356AFA226DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C45B1DD0-7C1D-406D-BC44-B356AFA226DB}.Release|Any CPU.Build.0 = Release|Any CPU
{C45B1DD0-7C1D-406D-BC44-B356AFA226DB}.Release|x64.ActiveCfg = Release|Any CPU
{C45B1DD0-7C1D-406D-BC44-B356AFA226DB}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -792,6 +802,7 @@ Global
{CA13DD91-30D5-45E8-AD0E-4F9049E7DC78} = {E62475E8-0BE1-4464-BBD9-FD06CC546593}
{E3097E23-9191-4028-83F2-D231590563FD} = {A54B4BB6-3439-432B-AFD9-FE62D6528D42}
{5574EA92-47A5-4483-BF7E-89231D38D318} = {E62475E8-0BE1-4464-BBD9-FD06CC546593}
{C45B1DD0-7C1D-406D-BC44-B356AFA226DB} = {E62475E8-0BE1-4464-BBD9-FD06CC546593}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B1989475-43D6-4AA5-9717-6DBF734B0C6E}
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ All notable changes to Audit.NET and its extensions will be documented in this f

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

## [27.2.0] - 2024-11-23:
- Audit.EntityFramework.Abstractions: Introducing `Audit.EntityFramework.Abstractions` assembly to decouple your domain layer from direct dependencies on EntityFramework or EntityFrameworkCore (#714)

## [27.1.1] - 2024-10-28:
- Audit.NET.MongoDB: Upgrading MongoDB.Driver to latest version 3.0.0 (#708)

Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>27.1.1</Version>
<Version>27.2.0</Version>
<PackageReleaseNotes></PackageReleaseNotes>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Description>Abstractions for Audit.EntityFramework and Audit.EntityFramework.Core</Description>
<Copyright>Copyright 2024</Copyright>
<AssemblyTitle>Audit.EntityFramework.Abstractions</AssemblyTitle>
<Authors>Federico Colombo</Authors>
<TargetFrameworks>net462;net472;netstandard2.1;net6.0;net7.0;net8.0</TargetFrameworks>
<DefineConstants>$(DefineConstants);STRONG_NAME</DefineConstants>
<NoWarn>$(NoWarn);1591</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Audit.EntityFramework.Abstractions</AssemblyName>
<AssemblyOriginatorKeyFile>../StrongName/Audit.NET.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
<PackageId>Audit.EntityFramework.Abstractions</PackageId>
<PackageTags>Audit;Trail;Log;Attribute</PackageTags>
<PackageIcon>icon.png</PackageIcon>
<PackageProjectUrl>https://github.com/thepirat000/Audit.NET</PackageProjectUrl>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryUrl>https://github.com/thepirat000/Audit.NET</RepositoryUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
<None Include="..\..\LICENSE" Pack="true" PackagePath="LICENSE" />
</ItemGroup>

<ItemGroup>
<None Include="images\icon.png" Pack="true" PackagePath="\" />
</ItemGroup>
</Project>
22 changes: 22 additions & 0 deletions src/Audit.EntityFramework.Abstractions/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Audit.EntityFramework.Abstractions")]
[assembly: AssemblyTrademark("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("f4b17a62-a499-4070-ac31-b912a9a048b0")]

[assembly: InternalsVisibleTo("Audit.UnitTest,PublicKey=00240000048000009400000006020000002400005253413100040000010001007f14e426ecfadb7a221dd166152164af7395256b474a50d56dad8080bba2edbea4ca85d89401245686311e557c9853c47095c6602a32d0a207ba2a55d282aa69d4f54d58eaf1e876fa18ac58bcd93bbb2aea797d7efda08ca0bc910dca508acc6ab6dbafcf7fd5b63859582ba558bf14d09f0b13d7a18b26688c1b2b98fcddc9"),
InternalsVisibleTo("Audit.EntityFramework.Core.UnitTest,PublicKey=00240000048000009400000006020000002400005253413100040000010001007f14e426ecfadb7a221dd166152164af7395256b474a50d56dad8080bba2edbea4ca85d89401245686311e557c9853c47095c6602a32d0a207ba2a55d282aa69d4f54d58eaf1e876fa18ac58bcd93bbb2aea797d7efda08ca0bc910dca508acc6ab6dbafcf7fd5b63859582ba558bf14d09f0b13d7a18b26688c1b2b98fcddc9")]
9 changes: 9 additions & 0 deletions src/Audit.EntityFramework.Abstractions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Audit.EntityFramework.Abstractions

**This assembly provides the abstractions for Audit.EntityFramework and Audit.EntityFramework.core.**

*Should be used with Audit.EntityFramework or Audit.EntityFramework.core*

## Notes

For more information, check the [Audit.EntityFramework documentation](https://github.com/thepirat000/Audit.NET/blob/master/src/Audit.EntityFramework/README.md).
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Audit.EntityFramework.Abstractions\Audit.EntityFramework.Abstractions.csproj" />
<ProjectReference Include="..\Audit.NET\Audit.NET.csproj" />
</ItemGroup>

Expand Down
3 changes: 2 additions & 1 deletion src/Audit.EntityFramework/Audit.EntityFramework.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@

<ItemGroup>
<None Include="..\..\LICENSE" Pack="true" PackagePath="LICENSE" />
<None Include="README.md" Pack="true" PackagePath="\"/>
<None Include="README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Audit.EntityFramework.Abstractions\Audit.EntityFramework.Abstractions.csproj" />
<ProjectReference Include="..\Audit.NET\Audit.NET.csproj" />
</ItemGroup>

Expand Down
2 changes: 2 additions & 0 deletions src/pack.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ del "audit.net.azurecosmos\bin\release\*.nupkg"
del "audit.net.mongodb\bin\release\*.nupkg"
del "audit.net.sqlserver\bin\release\*.nupkg"
del "audit.net.mysql\bin\release\*.nupkg"
del "Audit.EntityFramework.Abstractions\bin\release\*.nupkg"
del "audit.entityframework\bin\release\*.nupkg"
del "audit.entityframework.core\bin\release\*.nupkg"
del "audit.entityframework.Identity\bin\release\*.nupkg"
Expand Down Expand Up @@ -56,6 +57,7 @@ dotnet pack "Audit.NET.AzureCosmos/" -c Release
dotnet pack "Audit.NET.MongoDB/" -c Release
dotnet pack "Audit.NET.SqlServer/" -c Release
dotnet pack "Audit.NET.MySql/" -c Release
dotnet pack "Audit.EntityFramework.Abstractions/" -c Release
dotnet pack "Audit.EntityFramework/" -c Release
dotnet pack "Audit.EntityFramework.Core/" -c Release
dotnet pack "Audit.EntityFramework.Identity/" -c Release
Expand Down
2 changes: 2 additions & 0 deletions src/push.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ del "Audit.NET.Serilog\bin\release\*.symbols.nupkg"
del "Audit.MongoClient\bin\release\*.symbols.nupkg"
del "Audit.NET.Polly\bin\release\*.symbols.nupkg"
del "Audit.NET.Channels\bin\release\*.symbols.nupkg"
del "Audit.EntityFramework.Abstractions\bin\release\*.symbols.nupkg"

nuget push "audit.net\bin\release\*.nupkg" -NoSymbols -source %1
nuget push "Audit.NET.JsonNewtonsoftAdapter\bin\release\*.nupkg" -NoSymbols -source %1
Expand Down Expand Up @@ -78,3 +79,4 @@ nuget push "Audit.NET.Serilog\bin\release\*.nupkg" -NoSymbols -source %1
nuget push "Audit.MongoClient\bin\release\*.nupkg" -NoSymbols -source %1
nuget push "Audit.NET.Polly\bin\release\*.nupkg" -NoSymbols -source %1
nuget push "Audit.NET.Channels\bin\release\*.nupkg" -NoSymbols -source %1
nuget push "Audit.EntityFramework.Abstractions\bin\release\*.nupkg" -NoSymbols -source %1
2 changes: 1 addition & 1 deletion test/_execDotnetTest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if ($totalProjs -eq 0) {
$hasFailed = $false;

$projects | ForEach {
& dotnet test $_ --"logger:console;verbosity=normal" --no-build -c Release $extraParams
& dotnet test $_ --"logger:console;verbosity=normal" --no-build -c Release -m:1 $extraParams
if ($LASTEXITCODE -ne 0) {
$hasFailed = $true;
}
Expand Down

0 comments on commit ee29440

Please sign in to comment.