dotnet / efcore

EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.
https://docs.microsoft.com/ef/
MIT License
13.49k stars 3.13k forks source link

Data Classification APIs (Sql Server) #15693

Open stap123 opened 5 years ago

stap123 commented 5 years ago

With the announcement of the new SqlClient (https://devblogs.microsoft.com/dotnet/introducing-the-new-microsoftdatasqlclient/), specifically the data classification support. I thought it might be a good feature if there was something like a simple attribute/fluent api/both to allow you to setup the data classification options for the data in your EF models automatically.

I guess the basic idea is simply that you would tag all of the data with strings for the category and sub category that would just be picked up by migrations and automatically applied to the database as part of the standard workflow.

[DataClassification("CategoryName","SubCategoryName")]

It would help with the PII identification process and make it simpler for these to be tracked all the way through the development workflow.

Not sure if it's something that would be tackled by the EF team or put up for community contribution but thought this was the place to suggest it.

mweinand commented 5 years ago

I would like this feature as well.

bertvan commented 1 month ago

Early version of an implementation: https://github.com/roopert-digital/efcore-sensitivityclassification