c# - Dispose DataContext in local database -
i work local database in windows phone. required calling dispose() release resources , how best it?
using (datacontext context = new datacontext(dbconnectionstring)) { // context.submitchanges(); context.dispose(); }
the using here calls dispose() (no matter whether leaves or via exception). don't have to.
Comments
Post a Comment