May was a big month for new releases from Linux Academy! Take a look at what our team built recently in our blog. You can access the newest releases from our blog.
//This works because I write the actual entity name 'MainTable' in the code: string pkName = _dc.Mapping.GetTable(typeof(MainTable)).RowType.IdentityMembers.Name; //But I want to dynamically get the primary key of a table that is stored in a string variable. //I have tried this: Type tableType = Type.GetType("My.Namespace.." + _tableName); pkName = _dc.Mapping.GetTable(typeof(tableType)).RowType.IdentityMembers.Name; //This doesn't work because it wants an actual class name in the GetTable() method.
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.