<PackageReference Include="System.Security.Permissions" Version="10.0.0-rc.2.25502.107" />

DBDataPermissionAttribute

Associates a security action with a custom security attribute.
using System.ComponentModel; using System.Security.Permissions; namespace System.Data.Common { [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method, AllowMultiple = true, Inherited = false)] public abstract class DBDataPermissionAttribute : CodeAccessSecurityAttribute { public bool AllowBlankPassword { get; set; } public string ConnectionString { get; set; } public KeyRestrictionBehavior KeyRestrictionBehavior { get; set; } public string KeyRestrictions { get; set; } protected DBDataPermissionAttribute(SecurityAction action) : base(action) { } [EditorBrowsable(EditorBrowsableState.Never)] public bool ShouldSerializeConnectionString() { return false; } [EditorBrowsable(EditorBrowsableState.Never)] public bool ShouldSerializeKeyRestrictions() { return false; } } }