【问题标题】:How to create EncryptColumn by Fluent Api on EF Core如何在 EF Core 中通过 Fluent Api 创建加密列
【发布时间】:2021-12-06 07:19:03
【问题描述】:

有一个 package 允许我们使用 EncryptColumn 注释一个类,以便有一种加密 SQL 值的方法。

这种方法需要 POCO 类中的 Attribute,是否有使用 EF 的 Fluent API 并将某个 Column 配置为 EncryptColumn 的替代方法?

【问题讨论】:

标签: c# sql-server entity-framework entity-framework-core


【解决方案1】:

我认为您可以为此使用一些 3rd 方库。

例子

  1. https://www.nuget.org/packages/EntityFrameworkCore.EncryptColumn

  2. https://github.com/Eastrall/EntityFrameworkCore.DataEncryption

谢谢, 厄兰蒂卡

【讨论】:

  • 那是我在帖子上的内容,但他们在类上使用属性注释,是否有替代使用流式 API 代替属性注释的方法?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-12-11
  • 1970-01-01
  • 2018-08-18
  • 1970-01-01
  • 2021-10-16
  • 2014-09-05
相关资源
最近更新 更多