forked from wanglong/EquinoxProject
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using native EF Core 2.0 mapping configuration instead unnecessary cu…
…stom extensions
- Loading branch information
1 parent
4c8e881
commit 3447370
Showing
6 changed files
with
6 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
src/Equinox.Infra.Data/Extensions/EntityTypeConfiguration.cs
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
src/Equinox.Infra.Data/Extensions/ModelBuilderExtensions.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,19 @@ | ||
using Microsoft.EntityFrameworkCore; | ||
using Microsoft.EntityFrameworkCore.Metadata.Builders; | ||
using Equinox.Infra.Data.Extensions; | ||
using Equinox.Domain.Core.Events; | ||
|
||
|
||
namespace Equinox.Infra.Data.Mappings | ||
{ | ||
public class StoredEventMap : EntityTypeConfiguration<StoredEvent> | ||
public class StoredEventMap : IEntityTypeConfiguration<StoredEvent> | ||
{ | ||
public override void Map(EntityTypeBuilder<StoredEvent> builder) | ||
public void Configure(EntityTypeBuilder<StoredEvent> builder) | ||
{ | ||
builder.Property(c => c.Timestamp) | ||
.HasColumnName("CreationDate"); | ||
|
||
builder.Property(c => c.MessageType) | ||
.HasColumnName("Action") | ||
.HasColumnType("varchar(100)"); | ||
|
||
} | ||
} | ||
} |