A few days ago I made a post about using SQL CE 3.5 with LINQ to SQL.   I described a way to use connection pooling with SQL CE. A gracious blog reader (Mike Brown)  pointed out a way I could make my solution much simpler by using the [ThreadStatic] attribute.  I never heard of this attribute but it is really nifty.  You mark a field with it and then each thread that accesses that field will be accessing a unique instance of it!

 

Continue reading