LINQ in Action roller

Generics & DLINQ

I get the following error when I try to do what is described below. 'T' does not contain a definition for 'PrimaryKey' Is this not supported or am I doing something wrong? Code Snippet public class Base ... ... public static T FindBy(int primaryKey) { DataContext context = new DataContext("connection_string"); var entity = context.GetTable().Single(e => e.PrimaryKey == primaryKey); return (T) entity; } And there is also... Code Snippet public class Company : Base<Company> ... ... Read More...
Published Thursday, June 28, 2007 4:47 PM by MSDN Forums: LINQ Project General
Anonymous comments are disabled

Featured Item

This Blog

Sponsoring

Syndication