public Guid Create(int typeId) { var id = Guid.NewGuid(); var factory = _entityResolver.GetFactory(typeId); var entity = factory.Create(id); _entities[id] = entity; return(id); }