I would like to add attributes to Linq 2 Sql classes properties. Such as this Column is browsable in the UI or ReadOnly in the UI and so far.
I\'ve thought about usi
You can use a partial class to make your entity implement a interface that declares the same properties of your entity and then put the attributes on the interface.
This way you can use the interface type to get the attributes from the properties.
I don't know if you will be able to use the attributes this way, but you can try something like that.
Example:
public interface IConcept {
long Code { get; set; }
[Unique]
string Name { get; set; }
bool IsDefault { get; set; }
}
public partial class Concept : IConcept { }
[Table(Name="dbo.Concepts")]
public partial class Concept
{
//...
}