开发者

linqtosql object mapping

I am trying to create LinqToSql classes based on this article http://msdn.microsoft.com/en-us/library/bb425822.aspx

I couldn't get my code to compile for the first ex开发者_JAVA技巧ample

[Table(Name="Customers")]
public class Customer
{
   public string CustomerID;
   public string City;
}

The error message I got was "Cannot access internal constructor "Table" here". I know I need to add some using statement but don't know which one. Any suggestions?

Thanks.


Never mind. I found the answer. I was missing using System.Data.Linq.Mapping;

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜