score:3
I'm guessing that you are keeping DataContexts around and not calling Dispose on them when done (or leaving them around, at least).
Rather, you should initialize your DataContext, perform your operation, and then dispose of it when done. You shouldn't hold a reference to it between operations.
Preferably, you would use the using statement for handling the call to IDisposable.
Regarding connection pooling, the SqlClient pools connections by default, so unless you explicitly turn it off, you should be taking advantage of it already. Of course, if you aren't releasing connections you are using, then pooling will only take you so far.
Source: stackoverflow.com
Related Articles
- LINQ Source Code Available
- creating Linq to sqlite dbml from DbLinq source code
- source code for LINQ 101 samples
- c# Linq or code to extract groups from a single list of source data
- Convert string[] to int[] in one line of code using LINQ
- Code equivalent to the 'let' keyword in chained LINQ extension method calls
- Linq code to select one item
- How are people unit testing code that uses Linq to SQL
- LINQ query to perform a projection, skipping or wrapping exceptions where source throws on IEnumerable.GetNext()
- Syntax to execute code block inside Linq query?
- Enumerable.Empty<T>().AsQueryable(); This method supports the LINQ to Entities infrastructure and is not intended to be used directly from your code
- Best open source LINQ provider
- Is there a good source that gives an overview of linq optimizations?
- Does this LINQ code perform multiple lookups on the original data?
- How to understand the following C# linq code of implementing the algorithm to return all combinations of k elements from n
- LINQ WHERE method alters source collection
- Where can I view LINQ source code?
- Suggestions for designing complex LINQ code
- Is there any way to create a LINQ query as a variable without having the data source (yet)?
- Left outer join using LINQ -- understanding the code
- How to pass LinQ Expressions from F# to C# code
- How to reuse a linq expression for 'Where' when using multiple source tables
- Avoiding code repetition when using LINQ
- Using LINQ to delete an element from a ObservableCollection Source
- How does linq actually execute the code to retrieve data from the data source?
- How can I switch that code to use LINQ
- How does this linq code that splits a sequence work?
- multiple orderby in this linq code
- How can I combine this code into one or two LINQ queries?
- Linq with where clause in many-to-many EF Code First object
- Why doesn't LINQ include a `distinct` keyword?
- A more clean approach to sorting a string into another string
- Linq group by question
- Return Linq query results into List object
- Grouping of Xml Elements using Linq
- Using LINQ to query flat text files with fixed-length records?
- Detailed grid in my WPF/MVVM form with data from grouped LINQ query
- Any() on String
- LINQ join tables and count groups
- Return record with max column value using Entity Framework 6
- How to incorporate criteria in Where method?
- How can I use System.Linq.Dynamic to check if a JSON object matches a predicate
- Looping through DataTable & Constructing an Xml for each unique item
- Filter xml using xpath and linq (price with decimal separator and thousands separator spanish) VB. NET
- Extending Func to accept array parameter in C#
- How do I move files from one folder to another based on a substring of their names?
- is there a better performance's way to get only few columns in ASP MVC without getting the whole table and filter it with LinQ?
- LINQ Syntext Sequence
- Database registry is not totally updated
- List with anonymous type