Added interfaces to read and write data in DB and added DbContext implementing these
This commit is contained in:
		| @@ -0,0 +1,19 @@ | ||||
| using Domains.Common; | ||||
| using Microsoft.EntityFrameworkCore; | ||||
| using Microsoft.EntityFrameworkCore.Metadata.Builders; | ||||
|  | ||||
| namespace Infrastructure.Database.Configuration.Common | ||||
| { | ||||
|     public class AddressConfiguration : IEntityTypeConfiguration<Address> | ||||
|     { | ||||
|         public void Configure(EntityTypeBuilder<Address> entity) | ||||
|         { | ||||
|             entity.Property(p => p.Street) | ||||
|                 .IsUnicode(false) | ||||
|                 .HasMaxLength(100); | ||||
|             entity.Property(p => p.Building) | ||||
|                 .IsUnicode(false) | ||||
|                 .HasMaxLength(10); | ||||
|         } | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user