Капитальная чистка кода
This commit is contained in:
@@ -22,7 +22,7 @@ public static class EfCleanHelper
|
||||
object? schema = entityType.FindAnnotation("Relational:Schema")?.Value;
|
||||
|
||||
string tableName =
|
||||
entityType.GetAnnotation("Relational:TableName")?.Value?.ToString()
|
||||
entityType.GetAnnotation("Relational:TableName").Value?.ToString()
|
||||
?? throw new($"Не могу определить название таблицы для типа {entityType}");
|
||||
|
||||
string schemaName = schema?.ToString() ?? defaultSchemaName;
|
||||
|
||||
@@ -11,7 +11,6 @@ using Pf2eModel.Model.Base.Source;
|
||||
using Pf2eModel.Model.Base.Targets;
|
||||
using Pf2eModel.Model.Common;
|
||||
using Pf2eModel.Model.Common.I18n;
|
||||
using Pf2eModel.Model.Enum;
|
||||
using Pf2eModel.Model.Structure;
|
||||
using Pf2eModel.Model.Structure.AncestryRelation;
|
||||
using Pf2eModel.Model.Structure.ArchetypeRelation;
|
||||
@@ -85,37 +84,6 @@ public partial class Pf2eDbContext
|
||||
.IsRequired(required);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Определяет перечисления, используемые в модели.
|
||||
/// </summary>
|
||||
/// <param name="modelBuilder">Построитель модели.</param>
|
||||
private void DefineEnums(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasPostgresEnum<LocaleType>()
|
||||
.HasPostgresEnum<ActionCategory>()
|
||||
.HasPostgresEnum<ActionEnum>()
|
||||
.HasPostgresEnum<AttributeValues>()
|
||||
.HasPostgresEnum<ClassProgressionType>()
|
||||
.HasPostgresEnum<ConditionGroup>()
|
||||
.HasPostgresEnum<DeityCategory>()
|
||||
.HasPostgresEnum<DeityFonts>()
|
||||
.HasPostgresEnum<DeitySanctification>()
|
||||
.HasPostgresEnum<ElementEnum>()
|
||||
.HasPostgresEnum<EntityRarity>()
|
||||
.HasPostgresEnum<EntityType>()
|
||||
.HasPostgresEnum<FeatCategory>()
|
||||
.HasPostgresEnum<SizeEnum>()
|
||||
.HasPostgresEnum<SourceCategory>()
|
||||
.HasPostgresEnum<SpellAreaType>()
|
||||
.HasPostgresEnum<SpellDamageCategory>()
|
||||
.HasPostgresEnum<SpellDamageKinds>()
|
||||
.HasPostgresEnum<SpellTradition>()
|
||||
.HasPostgresEnum<TrainingRank>()
|
||||
.HasPostgresEnum<TraitType>()
|
||||
.HasPostgresEnum<VisionEnum>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Определяет базовые сущности и их связи.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user