are you missing a using directive or an assembly reference

M

m.a

Hello,

I have the following code which is an entity for a table in my database.
but I am getting several errors such as:

The type or namespace name 'ColumnAttribute' could not be found (are you
missing a using directive or an assembly reference?)

Using the generic type 'System.Data.Linq.Table<TEntity>' requires '1' type
arguments



What is the problem and how can I solve it?

Regards






[Table(Name = "Items")]

public class Items

{

[Column(IsPrimaryKey = true)]

public int Title { get; set; }

[Column]

public string Desc { get; set; }

}
 
I

Ignacio Machin ( .NET/ C# MVP )

Hello,

  I have the following code which is an entity for a table in my database.
but I am getting several errors such as:

The type or namespace name 'ColumnAttribute' could not be found (are you
missing a using directive or an assembly reference?)

 Using the generic type 'System.Data.Linq.Table<TEntity>' requires '1' type
arguments

What is the problem and how can I solve it?

Regards

[Table(Name = "Items")]

public class Items

{

[Column(IsPrimaryKey = true)]

public int Title { get; set; }

[Column]

public string Desc { get; set; }



}- Hide quoted text -

- Show quoted text -

The [Column] attribute is not being found, are you using the correct
include directive?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top