Skip to content

Commit

Permalink
add vanilla Dapper comparison to linker usage
Browse files Browse the repository at this point in the history
  • Loading branch information
mgravell committed Nov 12, 2023
1 parent 4bf9b50 commit bab9f85
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Dapper.AOT.sln
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dapper.Advisor", "src\Dappe
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "docs", "docs\docs.csproj", "{C6527566-38F4-43CC-9E0E-91C4B8854774}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UsageVanilla", "test\UsageVanilla\UsageVanilla.csproj", "{840EA1CA-62FF-409E-89F5-CD3BB269BAE3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -72,6 +74,10 @@ Global
{C6527566-38F4-43CC-9E0E-91C4B8854774}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C6527566-38F4-43CC-9E0E-91C4B8854774}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C6527566-38F4-43CC-9E0E-91C4B8854774}.Release|Any CPU.Build.0 = Release|Any CPU
{840EA1CA-62FF-409E-89F5-CD3BB269BAE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{840EA1CA-62FF-409E-89F5-CD3BB269BAE3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{840EA1CA-62FF-409E-89F5-CD3BB269BAE3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{840EA1CA-62FF-409E-89F5-CD3BB269BAE3}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -84,6 +90,7 @@ Global
{6753728F-5359-4CED-9A31-3345BCC8AC38} = {FE215D4B-811B-47BB-9F05-6382DD1C6729}
{A77B633C-573E-43CD-85A4-8063B33143B4} = {FE215D4B-811B-47BB-9F05-6382DD1C6729}
{C6527566-38F4-43CC-9E0E-91C4B8854774} = {1135D4FD-770E-41DF-920B-A8F75E42A832}
{840EA1CA-62FF-409E-89F5-CD3BB269BAE3} = {9A846B95-90CE-4335-9043-48C5B8EA4FB8}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A89CDAFA-494F-4168-9648-1138BA738D43}
Expand Down
3 changes: 2 additions & 1 deletion test/UsageLinker/Product.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
using System.Data.Common;

namespace UsageLinker;

#if AOT
[DapperAot(true)]
#endif
public class Product
{
public static dynamic GetProductDynamic(DbConnection connection, int productId) => connection.QueryFirst(
Expand Down
1 change: 1 addition & 0 deletions test/UsageLinker/UsageLinker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<PublishTrimmed>true</PublishTrimmed>
<PublishAot>true</PublishAot>
<InterceptorsPreviewNamespaces>$(InterceptorsPreviewNamespaces);Dapper.AOT</InterceptorsPreviewNamespaces>
<DefineConstants>$(DefineConstants);AOT</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Dapper" />
Expand Down
16 changes: 16 additions & 0 deletions test/UsageVanilla/UsageVanilla.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<SignAssembly>False</SignAssembly>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\UsageLinker\*.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Dapper" />
<PackageReference Include="Microsoft.Data.SqlClient" />
<!--<PackageReference Include="Oracle.ManagedDataAccess.Core"/>-->
</ItemGroup>
</Project>

0 comments on commit bab9f85

Please sign in to comment.