SQL includes unnecessary columns

EF will include extra Id columns when selecting a bunch of columns to retrieve, but it does not do so when selecting a single column: using System; using System.Collections.Generic; using System.Co...

Id #2773 | Release: None | Updated: Today at 4:14 PM by br1 | Created: Today at 4:14 PM by br1

Migration scaffolding failed to generate DropFK before DropTable call.

Hi, I think I am hitting a bug in migration scaffolding (repro solution attached). I have TPT (MeasurementBase, MeasurementA, MeasurementB) scenario and a relation specified in the base cl...

Id #2772 | Release: None | Updated: Fri at 7:31 PM by stefando | Created: Fri at 7:31 PM by stefando

OrderBy().FirstOrDefault(<condition>) vs. Where(<condition>).OrderBy().FirstOrDefault()

Hello! I'm having a strange issue which I've already posted on stackoverflow http://stackoverflow.com/questions/31162938/orderby-firstordefaultcondition-vs-wherecondition-orderby-firstorde Is thi...

Id #2771 | Release: None | Updated: Thu at 9:56 AM by Vanice | Created: Thu at 9:56 AM by Vanice

Customizing Code First to an Existing Database - how to include additional template files ?

I have installed the EntityFramework.CodeTemplates package and got the Context and EntityType *.t4 template files into my VisualStudio project. Is it possible to add into these template files refe...

Id #2765 | Release: None | Updated: Wed at 8:47 AM by RickyTad | Created: Jun 16 at 2:21 PM by RickyTad

Wrong SQL translation of left join ... group by ... count()

This is some simple code for user polls. I'm trying to count poll votes: public class PollAnswer : EntityBase { public PollAnswer() { PollUserAnswers = new HashSet<PollUserAnswer>()...

Id #2764 | Release: Investigation | Updated: Jun 16 at 6:16 PM by RoMiller | Created: Jun 16 at 12:19 PM by xumix

Query :: incorrect sql produced for query with ToString

Copied from here: https://github.com/aspnet/EntityFramework/issues/2373 hiwjcn: just a test: int i=0; List<user> list=db.Set<user>().Where(x=>x.user_email==i.ToString()).ToList(); When i pu...

Id #2763 | Release: Investigation | Updated: Jun 16 at 6:17 PM by RoMiller | Created: Jun 15 at 9:03 PM by maumar

Piecemeal Add of object graph with PK-FK nullable key causes exception

Issue context is available at https://github.com/refactorthis/GraphDiff/issues/130 Summary: Say you have the following object model and EntityConfiguration public class PKFKModelPrimary { [Key]...

Id #2761 | Release: Investigation | Updated: Jun 16 at 6:20 PM by RoMiller | Created: Jun 12 at 10:01 PM by rwdalpe

RelationshipEntry is marked Friend

I am trying to find a strange concurrency problem in my code, and in the DbUpdateException that is thrown I have a number of lines which attempt to log everything that is found in the exception. I...

Id #2760 | Release: Investigation | Updated: Jun 12 at 6:40 PM by RoMiller | Created: Jun 11 at 6:17 PM by Arkitec

DatabaseLogFormatter logs incorrect sql query execution times

If you new up multiple DbContext and make queries in parallel, each context's DatabaseLogFormatter receives interception notifications of every other DbContext! It confuses the DatabaseLogFormatte...

Id #2759 | Release: EF 6.2.0 | Updated: Jun 12 at 6:41 PM by RoMiller | Created: Jun 10 at 4:58 AM by clement_911

SqlCommand.Parameters having same variable declared twince

Hi, I am working in some interceptor for multi-tenant application and when I was doing INSERT behavior, I found something strange. Here is my code that change DbInsertCommandTree: public class...

Id #2755 | Release: Investigation | Updated: Jun 2 at 9:53 PM by AlbertoMonteiro | Created: May 30 at 5:14 PM by AlbertoMonteiro