All Questions

501
votes
25answers
281137 views

Fastest Way of Inserting in Entity Framework

I'm looking for the fastest way of inserting into Entity Framework. I'm asking this because of the scenario where you have an active TransactionScope and the insertion is huge (4000+). It can potenti...
238
votes
4answers
96608 views

Entity Framework and Connection Pooling

I've recently started to use the Entity Framework 4.0 in my .NET 4.0 application and am curious about a few things relating to pooling. Connection pooling as I know is managed by the ADO.NET data pr...
24
votes
4answers
24054 views

ASP.NET MVC 2.0 Implementation of searching in jqgrid

Hi I am trying to use the single column search in jqgrid using MVC 2 IN .NET (VS 2008) this is the code I have so far but I need an example to match it with or a tip of what I am missing jQuery("#l...
297
votes
12answers
160410 views

The entity cannot be constructed in a LINQ to Entities query

There is an entity type called product that is generated by entity framework. I have writen this query public IQueryable<Product> GetProducts(int categoryID) { return from p in db.Products ...
444
votes
15answers
191156 views

How do I view the SQL generated by the Entity Framework?

How do I view the SQL generated by entity framework ? (In my particular case I'm using the mysql provider - if it matters)
53
votes
4answers
9154 views

WPF Programming Methodology

After 3 months programming my APP on WPF, I've second thought about the way I'm programming my app (I know it's maybe too late). On my APP I'm using an API of a software that my tool is managing. I've...
228
votes
5answers
94775 views

Create code first, many to many, with additional fields in association table

I have this scenario: public class Member { public int MemberID { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public virtual ICollection&l...
21
votes
2answers
24624 views

EF: Include with where clause

As the title suggest I am looking for a way to do a where clause in combination with an include. Here is my situations: I am responsible for the support of a large application full of code smells. Ch...
321
votes
9answers
72053 views

One DbContext per web request... why?

I have been reading a lot of articles explaining how to set up Entity Framework's DbContext so that only one is created and used per HTTP web request using various DI frameworks. Why is this a good i...
80
votes
16answers
94780 views

ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value

In a nutshell the exception is thrown during POSTing wrapper model and changing the state of one entry to 'Modified'. Before changing the state, the state is set to 'Detached' but calling Attach() doe...

Previous Next