Skip to content

Commit 0c9eb33

Browse files
authored
Dynamic include DataProtectionKey.Id (#43204)
1 parent 4b3f57e commit 0c9eb33

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/DataProtection/EntityFrameworkCore/src/DataProtectionKey.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
using System.Diagnostics.CodeAnalysis;
5+
46
namespace Microsoft.AspNetCore.DataProtection.EntityFrameworkCore;
57

68
/// <summary>
79
/// Code first model used by <see cref="EntityFrameworkCoreXmlRepository{TContext}"/>.
810
/// </summary>
11+
// DataProtectionKey.Id is not used anywhere. Add DynamicallyAccessedMembers to prevent it from being trimmed.
12+
// Note that in the future EF may annotate itself to include properties automatically, and the annotation here could be removed.
13+
// Fixes https://github.com/dotnet/aspnetcore/issues/43187
14+
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)]
915
public class DataProtectionKey
1016
{
1117
/// <summary>

0 commit comments

Comments
 (0)