(type)
- )
- .Include(e => e.Sources)
- .ThenInclude(s => s.Source)
- .Include(e => e.Keywords)
- .Include(e => e.Externals)
- .ThenInclude(x => x.Target)
- .Include(e => e.Traits)
- .ThenInclude(t => t.Entity)
- .FirstOrDefault() ?? throw new("Entity is null");
- /*
- if (id == null)
+ if (entity == null)
{
return NotFound();
}
- var class = await _context.Classes.FirstOrDefaultAsync(m => m.Id == id);
+ // Создаём FullEntity
+ FullEntity = new(_context, entity);
- if (class is not null)
- {
- Class = class;
+ // Сериализуем для отображения
+ EntitySerializer serializer = new();
+ SerializationResult = serializer.Serialize(FullEntity);
- return Page();
- }
- */
- return NotFound();
+ return Page();
}
}
}
diff --git a/Pf2e/Web/Pages/EntityType.cshtml b/Pf2e/Web/Pages/EntityType.cshtml
index 0d09c2c..9316c02 100644
--- a/Pf2e/Web/Pages/EntityType.cshtml
+++ b/Pf2e/Web/Pages/EntityType.cshtml
@@ -45,7 +45,7 @@
@Html.DisplayFor(modelItem => item.Id)
|
-
+
@Html.DisplayFor(modelItem => item.Name[LocaleType.English])
|