示例#1
0
		/// <summary>
		/// Given a MSL mapping subtree, adapt it using the instance IModelAdapter
		/// </summary>
		/// <param name="mappingReader"></param>
		/// <returns></returns>
		private XmlReader AdaptMappingMetadata(XmlReader mappingReader)
		{
			var xml = XElement.Load(mappingReader);

			// Walk the storage EntitySets and adapt
			foreach (var attribute in xml.Descendants().Attributes("StoreEntitySet"))
				ModelAdapter.AdaptMappingStoreEntitySetAttribute(attribute);

			// Walk the storage FunctionImportMapping and adapt
			foreach (var attribute in xml.Descendants().Attributes("FunctionName"))
				ModelAdapter.AdaptMappingFunctionNameAttribute(attribute);

			return xml.CreateReader();
		}