I recently took on the LinqPad tool project, which would give the results of a Dump query in CSV format to use a bulk database tool to quickly get results. One thing I wanted to learn from this tool was the ability to work in Visual Studio and LinqPad. Thus, if I used LinqtoSQL in VS2010 or LinqPad, I could quickly send the results to a csv file and then open it in Excel to view the results.
The biggest hiccups in the project are explained by how LinqPad builds its DataContexts against how Visual Studio creates its DataContexts. The best information I can find about how LinqPad does this is here . Basically, what I found from my project was that VS2010 creates properties for its DataContexts, but LinqPad creates fields. Thus, when using reflection:
LINQPad:
dataContextType.GetProperties()
dataContextType.GetFields()
VS 2010 LinqToSQL:
dataContextType.GetProperties()
dataContextType.GetFields()
So why does LinqPad use fields instead of properties in its DataContexts? Wouldn't it be more appropriate to copy the LinqToSQL Visual Studio template?
Update
Based on the comment, I decided to ask the same question in the LinqPad forum .