What you are after is a 'Buddy Class'. Scott Gu mentions it in his post for ASP.NET MVC 2 CTP 1 but doesn't go into it.
Anyway, this is my understanding of it. Say you have a Table called Ninja (thanks Phil Haack! ;-) and you obviously have the corresponding linq to sql class that is generated along side all the other linq to sql classes.
What you now need to do is create your own partial class with a 'MetadataType' attribute like so:
[MetadataType(typeof(Ninja_Metadata))]
public partial class Ninja
{
//Custom model stuff
}
Now you create your 'Buddy Metadata Class' where you can add attributes to properties that are generated by the linq to sql designer:
public class Ninja_Metadata
{
[DisplayName("Shurikens")]
public int ShurikenCount { get; set; }
[DisplayName("Blowgun Darts")]
public int BlowgunDartCount { get; set; }
}
Sweet feed?
HTHs
Charles
Ps. The use of these 'buddy classes' are also great for adding support for the DataAnnotation Validation attributes.