DataContext.CreateDatabase Attribute Compiler Error
I looked at this example http://msdn.microsoft.com/en-us/library/bb399420.aspx and clicked on DataContext.CreateDatabase which brought me to this page http://msdn.microsoft.com/en-us /library/system.data.linq.datacontext.createdatabase.aspx
It says to use the System.Data.Linq namespace and include the System.Data.Linq reference.
I did it and returned an error
error CS0246: The type or namespace name 'Column' could not be found (are you missing a using directive or an assembly reference?)
[Table(Name = "DVDTable")]
public class DVD
{
[Column(IsPrimaryKey = true)] //<-- here
public string Title;
[Column]
public string Rating;
}
How do I fix this error?
0
user34537
a source
to share