开发者

linqtosql object mapping

开发者 https://www.devze.com 2023-03-26 11:54 出处:网络
I am trying to create LinqToSql classes based on this article http://msdn.microsoft.com/en-us/library/bb425822.aspx

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

精彩评论

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