locked
DynamicData and Linq-to-XML RRS feed

  • Question

  • User1318199919 posted

    From my reading, it appears that Linq-to-SQL and Linq-to-Entities are supported as sources for the DynamicData feature.  Can an XML file (I assume through Linq-to-XML) be a source also?

     Thanks!

    Monday, September 1, 2008 2:15 PM

All replies

  • User188291263 posted

    XMLprovider not exist,but you are welcome to create your own.
    Here is starting point http://blogs.msdn.com/marcinon/archive/2008/05/22/dynamic-data-samples-custom-metadata-providers.aspx

    Basically,you need to create your custom MetadataProviderFactory,which you plug in your module

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

    Monday, September 1, 2008 3:23 PM