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

特别是 MetadataProviderFactory Line...我似乎不太明白它在 VB 中的外观...

4

3 回答 3

1
MetadataProviderFactory = Function(type) new DefaultTypeDescriptionProvider(
    type, new AssociatedMetadataTypeTypeDescriptionProvider(type))
于 2009-08-08T16:27:22.737 回答
1
MetadataProviderFactory = Function (type) New DefaultTypeDescriptionProvider(
    type, New AssociatedMetadataTypeTypeDescriptionProvider(type))
于 2009-08-08T16:28:40.393 回答
1

我相信你正在寻找这样的东西:

model.RegisterContext(GetType(NorthwindDataContext), 
    New ContextConfiguration() With
    {
        .ScaffoldAllTables = True,
        .MetadataProviderFactory = Function(type) _
            New DefaultTypeDescriptionProvider(
                type, 
                New AssociatedMetadataTypeTypeDescriptionProvider(type))
    })
于 2009-08-08T16:28:59.770 回答