Продолжение
This commit is contained in:
@@ -175,7 +175,8 @@ public partial class MainViewForm : Form
|
||||
Converters = [
|
||||
new EntityConverter(),
|
||||
new StringEnumConverter { NamingStrategy = new CamelCaseNamingStrategy() },
|
||||
]
|
||||
],
|
||||
ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
|
||||
};
|
||||
|
||||
string result = JsonConvert.SerializeObject(entity, settings);
|
||||
@@ -195,6 +196,14 @@ public partial class MainViewForm : Form
|
||||
.Include(a => a.AncestryBoosts)
|
||||
.FirstOrDefault(e => e.Id == entity.Id);
|
||||
|
||||
case EntityType.Archetype:
|
||||
return Context.Archetypes
|
||||
.Include(a => a.DedicationFeat)
|
||||
.ThenInclude(f => f.Entity)
|
||||
.Include(a => a.Feats)
|
||||
.ThenInclude(f => f.Entity)
|
||||
.FirstOrDefault(a => a.Id == entity.Id);
|
||||
|
||||
case EntityType.Background:
|
||||
return Context.Backgrounds
|
||||
.Include(b => b.BackgroundBoosts)
|
||||
@@ -211,6 +220,12 @@ public partial class MainViewForm : Form
|
||||
.Include(c => c.ClassProgressions)
|
||||
.FirstOrDefault(c => c.Id == entity.Id);
|
||||
|
||||
case EntityType.Feat:
|
||||
return Context.Feats
|
||||
.Include(f => f.Archetypes)
|
||||
.ThenInclude(a => a.Entity)
|
||||
.FirstOrDefault(f => f.Id == entity.Id);
|
||||
|
||||
default:
|
||||
Type type = EntityOfTypeAttribute.Resolve(entity);
|
||||
return (IEntity?) Context.Find(type, entity.Id);
|
||||
|
||||
Reference in New Issue
Block a user