tags:

views:

23

answers:

1

Hi,

How could I add a custom propery to a LINQ2SQL class. if I have 2 properties "filename" and "filepath" and I'd like to return a property such as "fullFilePath".

thank!

+2  A: 

See this MSDN article - Adding Business Logic By Using Partial Methods (LINQ to SQL)

public partial class myLinqClass {
   public string fullFilePath {
      get { return this.filepath + this.filename; } //clean this up as appropriate
   }
}
Alison
perfect! thank you!
roman