【发布时间】:2017-11-20 20:52:13
【问题描述】:
我需要在 edmx 文件中以编程方式将属性节点的 StoreGeneratedPattern 更新为“None”,基于一些标准,例如 Name 属性包含“Code”值,选择此类 Property 元素的 XPath 将是什么?
<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
<!-- EF Runtime content -->
<edmx:Runtime>
<!-- SSDL content -->
<edmx:StorageModels>
<Schema Namespace="Model.Store" Provider="System.Data.CData.DynamicsCRM" ProviderManifestToken="DynamicsCRM" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
<EntityType Name="Account">
<Key>
<PropertyRef Name="Id" />
</Key>
<Property Name="Id" Type="varchar" StoreGeneratedPattern="Identity" Nullable="false" />
<Property Name="AccountCategoryCode" Type="varchar" StoreGeneratedPattern="Computed" />
<Property Name="AccountClassificationCode" Type="varchar" StoreGeneratedPattern="Computed" />
<Property Name="AccountNumber" Type="varchar" />
【问题讨论】:
标签: c# xml linq-to-xml edmx