Renaming LINQ 2 SQL Entity Properties Through Partial Classes
问题 Can I use partial classes to create properties that points to an association property generated by the L2S designer. Also, will I be able to use the new property in queries? How can I achieve this? 回答1: Yes you can, but you have to apply the same attributes as the linq2sql generated property i.e. [Association(Name="Test_TestData", Storage="_TestDatas", ThisKey="SomeId", OtherKey="OtherId")] public System.Data.Linq.EntitySet<TestData> MyTestDatas { get { return this.TestDatas; } } TestDatas