public NpcDto(ContextManager context, Guid?selectedNpc) { if (selectedNpc.HasValue) { SelectedItem = context.Get <NPC>(selectedNpc.Value); History = context.GetHistory(typeof(NPC), selectedNpc.Value); } else { History = new List <History>(); } NPCs = context.Context.NPCs.ToList().Cast <ElementId>().ToList(); NPCs.Insert(0, new ElementId { ID = Guid.Empty, Name = "N/A" }); Locations = context.Context.Locations.ToList().Cast <ElementId>().ToList(); AllAlligments = context.Context.Alligments.ToList().Cast <ElementId>().ToList(); }