I have a very simple question and would be great if someone could save me some typing in the future.
I see myself typing this statement often:
using (DataClasses1DataContext db = new DataClasses1DataContext())
I remember seeing a shorter version of it somewhere but can seem to find it. I believe it has the name of the datacontext only typed once.
Thanks!
Like this?
To abbreviate it even further you could do something like this:
Where DataClass has a static method DB that returns a new instance of your data context.