score:7
is it good approach to use above technique in web based application???
no. datacontext is not thread safe. you cannot share 1 datacontext among the different threads handling different requests safely.
also - this pattern is called singleton, not factory
Source: stackoverflow.com
Related Query
- LINQ :: Use static DataContext to prevent Concurrency Problem
- Should I use one LINQ DataContext or many?
- LINQ Source Code Available
- How can I switch that code to use LINQ
- Use a linq query as microsoft local report Data Source (WinForms)
- Determine the source DataContext for a Linq to Sql query
- creating Linq to sqlite dbml from DbLinq source code
- Can I prevent a LINQ DataContext from using a transaction when a TransactionScope is present?
- Linq to sql as object data source - designer problem with partial classes
- Linq to sql query: how to prevent duplication of code
- Is it possible to prevent LINQ from using variables in queries and instead use string literals?
- Silverlight and RIA Services with LINQ-to-SQL DataContext - Unable to use client side linq queries
- Can I use a LINQ IEnumerable result as the data source for a Gtk.TreeView?
- Is maintain the transaction with a static LINQ to SQL DataContext in asp.net possible?
- source code for LINQ 101 samples
- Can I Use The Same Linq Code to Query for Different Conditions?
- How to use Linq to group, sum or retrieve total. My current code returns nothing
- Linq code have errors when i use Distinct()
- Does Linq in Entity Framework code first use SQL or does it get the whole table first?
- Linq Scope Problem + Reduce Repeated Code
- how to translate a linq expression into sql string use c# code
- c# Linq or code to extract groups from a single list of source data
- How to assign LINQ Query to a variable and then use it later in the code
- How to use LINQ expressions as static members of classes in queries when the class is related multiple times to a second class
- convert code to use Linq
- Use LINQ to get items in one List<>, that are not in another List<>
- How to use LINQ to select object with minimum or maximum property value
- Convert string[] to int[] in one line of code using LINQ
- When to use Cast() and Oftype() in Linq
- Code equivalent to the 'let' keyword in chained LINQ extension method calls
More Query from same tag
- Get specific object in list in Entity Framework
- What would be Linq for Following
- How can i get sql query Equivalent to a linq expression
- Linq (MIN && MAX)
- at what point does linq-to-sql or linq send a request to the database
- Change the sequens of columns in datatable with linq
- Don't have a nullReferenceException on XML Parsing
- How to add a namespace when parsing string to Xelement?
- Query always returns previous value?
- LINQ beginner, table joining query for document version
- How to pass an array of OrderBy expression to a method?
- EF6 Linq Query .Include only returning first entry of child table
- Implement this "not in" where clause in LINQ
- Remove from a list that has a list within it based on integer list
- SELECT result map to entity in Dynamic Linq in Entity Framework Core
- Windows phone:Feed large string into database table
- Put value in datatable group by week
- Am I using LINQ correctly to apply a variable amount of filters?
- Is there anyway i can append /concat an element to an enumerable if condition?
- A specified Include path is not valid. The EntityType does not declare a navigation property with the name *
- Select parents with specific children in LINQ
- linq query to select top 3 from a group and get the average of those selected
- How can I make a LINQ query with subqueries in the from statement?
- LINQ to Entities Group By and then select the min value
- LINQ to SQL querying across relationships
- Difference between two Lists with non-unique Entries
- Linq -Where clause with not exists?
- How to fix "An expression may not contain a dynamic operation" in Linq?
- LINQ in Entity Framework append onto DATETIME WHERE clause
- Search Elements from Xml matching with a list of ids