Switch Owned value types to ComplexProperty which is better fit.
This requires fluent configuration. Also made some conversion registration context wide.
This commit is contained in:
parent
07393f57fc
commit
1a8c63808a
11 changed files with 93 additions and 54 deletions
12
IdentityShroud.Core/EFCore/Converters/DekIdConverter.cs
Normal file
12
IdentityShroud.Core/EFCore/Converters/DekIdConverter.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
using IdentityShroud.Core.Security;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace IdentityShroud.Core;
|
||||
|
||||
public class DekIdConverter : ValueConverter<DekId, Guid>
|
||||
{
|
||||
public DekIdConverter()
|
||||
: base(id => id.Id, guid => new DekId(guid))
|
||||
{
|
||||
}
|
||||
}
|
||||
12
IdentityShroud.Core/EFCore/Converters/KekIdConverter.cs
Normal file
12
IdentityShroud.Core/EFCore/Converters/KekIdConverter.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
using IdentityShroud.Core.Security;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace IdentityShroud.Core;
|
||||
|
||||
public class KekIdConverter : ValueConverter<KekId, Guid>
|
||||
{
|
||||
public KekIdConverter()
|
||||
: base(id => id.Id, guid => new KekId(guid))
|
||||
{
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue