On Sat, 2009-06-13 at 22:25 -0700, Erickson wrote:
> this piece of code works
>
> using (ParkingDataContext context = new ParkingDataContext())
> {
> IQueryable result = context.users;
> return result;
> }
While that may work, it shouldn't work at all. Trying the same
with .NET results in an ObjectDisposedException, and DbLinq should do
the same. (It doesn't, but it will shortly. ;-)
The reason for this is
http://msdn.microsoft.com/en-us/library/bb355414.aspx:
Releases all resources used by the DataContext.
Resources will include tracked objects, the database connection, etc.
While the constructor notes that it's not necessary to call dispose,
calling Dispose() should place the object into a disposed state.
- Jon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DbLinq" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/dblinq?hl=en
-~----------~----~----~----~------~----~------~--~---