Skip to content

Commit 6610725

Browse files
committed
Update to lang version 9.0
1 parent 55fa814 commit 6610725

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77

88
`EntityFrameworkCore.DataEncryption` is a [Microsoft Entity Framework Core](https://github.com/aspnet/EntityFrameworkCore) extension to add support of encrypted fields using built-in or custom encryption providers.
99

10+
## Disclaimer
11+
12+
This library has been developed initialy for a personal project of mine. It provides a simple way to encrypt column data.
13+
14+
I **do not** take responsability if you use this in a production environment and loose your encryption key.
15+
1016
## How to install
1117

1218
Install the package from [NuGet](https://www.nuget.org/) or from the `Package Manager Console` :

src/EntityFrameworkCore.DataEncryption/EntityFrameworkCore.DataEncryption.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFrameworks>netstandard2.0</TargetFrameworks>
5+
<LangVersion>9.0</LangVersion>
56
<AssemblyName>EntityFrameworkCore.DataEncryption</AssemblyName>
67
<RootNamespace>Microsoft.EntityFrameworkCore.DataEncryption</RootNamespace>
78
<Version>2.0.0</Version>

src/EntityFrameworkCore.DataEncryption/ModelBuilderExtensions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public static class ModelBuilderExtensions
1818
/// <param name="encryptionProvider">Encryption provider.</param>
1919
public static void UseEncryption(this ModelBuilder modelBuilder, IEncryptionProvider encryptionProvider)
2020
{
21-
if (encryptionProvider == null)
21+
if (encryptionProvider is null)
2222
{
2323
throw new ArgumentNullException(nameof(encryptionProvider), "Cannot initialize encryption with a null provider.");
2424
}
@@ -32,6 +32,7 @@ public static void UseEncryption(this ModelBuilder modelBuilder, IEncryptionProv
3232
if (property.ClrType == typeof(string) && !IsDiscriminator(property))
3333
{
3434
object[] attributes = property.PropertyInfo.GetCustomAttributes(typeof(EncryptedAttribute), false);
35+
3536
if (attributes.Any())
3637
{
3738
property.SetValueConverter(encryptionConverter);

0 commit comments

Comments
 (0)