public class Entities : IList<Entity> public class Entity { public int databaseId; public int quantity; } public class Component : Entity { public string code; }