views:

68

answers:

1

One of the fields in a table in my database stores string values delimited by '|'. Of course, when I generated a Linq data model from the table using the VS designer, a string property has been created for the mentioned field. I want to override that property so as to expose the stored values as a more convenient string array (splitting them by '|').

+2  A: 

What I would do is create a partial class (all LINQ-to-SQL classes are partial by default) of your class and exposing a property with the desired behaviour. Something like this:

 public partial YourClass {

     public string[] SpecialProp { get { return OtherProp.Split('|'); } }
 }
Robban