I've read that in MEF2 you no longer use Lazy<IExtension, IExtensionMetadata>, but now you must
provide a concrete type for the metadata view and use ExportFactory<> instead of Lazy<>.

However, I can't find any examples of how this should all work - just a few mentions of using a concrete type instead of an interface.

I've tried a few things, but keep getting the following exception - "Export metadata for 'AccountID' is missing and no default value was supplied".

My code...

Creating the container (in Global.asax or App_Start folder):

// Get assemblies that will be providing imports and exportsvar assemblies = GetAssemblies();
// Get conventions that will be used to find imports and exportsvar conventions = GetConventions();
var container = new ContainerConfiguration().WithAssemblies(assemblies, conventions).CreateContainer();
// Create and apply a MefControllerFactory so controllers can be composed
ControllerBuilder.Current.SetControllerFactory(new MefControllerFactory(container));