Added interfaces to read and write data in DB and added DbContext implementing these

This commit is contained in:
2024-08-13 22:02:50 +03:00
parent 3c17580941
commit b424f0561e
16 changed files with 314 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
using Domains.Common;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace Infrastructure.Database.Configuration.Common
{
public class CountryConfiguration : IEntityTypeConfiguration<Country>
{
public void Configure(EntityTypeBuilder<Country> entity)
{
entity.Property(p => p.Name)
.IsUnicode(false)
.HasMaxLength(70);
}
}
}