using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; using Util.Samples.Domain.Models; namespace Util.Samples.Data.Mappings.Systems.Oracle { /// /// 应用程序映射配置 /// public class ApplicationMap : Util.Datas.Ef.Oracle.AggregateRootMap { /// /// 映射表 /// protected override void MapTable( EntityTypeBuilder builder ) { builder.ToTable( "Application", "Systems" ); } /// /// 映射属性 /// protected override void MapProperties( EntityTypeBuilder builder ) { //应用程序编号 builder.Property( t => t.Id ) .HasColumnName( "ApplicationId" ); builder.HasQueryFilter( t => t.IsDeleted == false ); } } }