因此,我想为LINQ to SQL编写一个通用的Upsert函数,但我在概念上遇到了一些问题。我希望它是这样工作的:db.Customers.UpsertOnSubmit(customer);var context = source.Context;
var table = context.Mapping.GetTable(sour
();
return null; // Some LINQ to get the first DataTemplate in source with the {x:DataType} that,我不知道如何在C#中获得{x:DataType}属性(我知道它实际上不是一个真正的属性,但我希望有一种通过代码检索它的方法)。我需要这样的东西,才能从正确的模板组中为每个对象获得正确的Dat