views:

289

answers:

3
        model.RegisterContext(typeof(NorthwindDataContext), new ContextConfiguration()
    {
        ScaffoldAllTables = true,
        MetadataProviderFactory = (type => new DefaultTypeDescriptionProvider(type, new AssociatedMetadataTypeTypeDescriptionProvider(type)))
    });

In particular the MetadataProviderFactory Line... I can't quite seem to figure out how it should look in VB...

+1  A: 
MetadataProviderFactory = Function(type) new DefaultTypeDescriptionProvider(
    type, new AssociatedMetadataTypeTypeDescriptionProvider(type))
Henri
+1  A: 
MetadataProviderFactory = Function (type) New DefaultTypeDescriptionProvider(
    type, New AssociatedMetadataTypeTypeDescriptionProvider(type))
Ben M
+1  A: 

I believe that you're looking for something like this:

model.RegisterContext(GetType(NorthwindDataContext), 
    New ContextConfiguration() With
    {
        .ScaffoldAllTables = True,
        .MetadataProviderFactory = Function(type) _
            New DefaultTypeDescriptionProvider(
                type, 
                New AssociatedMetadataTypeTypeDescriptionProvider(type))
    })
Dustin Campbell