How to cast to MyInterface<TEntity>
===

I have implemented a generic repository, but have a requirement to dynamically create the appropriate repository at runtime given the entity type as a string.

I have managed to create the repository using:

            Assembly common = Assembly.LoadFrom(@"CommonLibrary.dll");
            Type entityType = common.GetType("Models.OneOfManyEntities");
            Type repoType = typeof(TradeSiftRepository<>).MakeGenericType(entityType);
 
            var repo = Activator.CreateInstance(repoType, new UnitOfWork());

However `repo` is an object and I really want it cast to `IRepsotory<TEntity>` I have tried `IRepository<entityType>` but that is not correct