I am trying to write a utility that automatically sets an attribute ProviderManifestTokenin an EDMX document schema element, but even my basic XPath does not work. What am I doing wrong?
XML:
<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx">
<edmx:Runtime>
<edmx:StorageModels>
<Schema Namespace="PvmmsModel.Store" Alias="Self" Provider="System.Data.SqlClient" ProviderManifestToken="2005
My attempt:
var edmx = new XmlDocument();
edmx.Load(@"C:\Development\Provantage\PvmmsApp\Model.edmx");
var nsm = new XmlNamespaceManager(edmx.NameTable);
nsm.AddNamespace("edmx", "http://schemas.microsoft.com/ado/2007/06/edmx");
var x = edmx.SelectSingleNode("//edmx:Edmx/edmx:Runtime/edmx:StorageModels", nsm);
This works, but as soon as I add Schemato the request. Then I get a null result.
Profk source
share