c# - Entity Framework returning partially empty dataset -


i have dbcontext query return model contains total count of items , ienumerable type represents subset of items. have 3 environments: localhost, development, , test. using same version of code, development , localhost return complete dataset count , list of items. test returns proper count empty list of items. codeset same between environments. have pointed environments @ same database isolate issues might exist in db. query looks like:

var rawitems = context.entity.where(x => x.id == id).orderby(x => x.id); totalcount = rawitems.count(); return rawitems.skip(0).take(25).select(x => x.toexternalmodel()) 

toexternalmodel transformation method takes object , transforms different model. there no exceptions thrown code. removed try/catches make sure.

i think environment problem don't know else possibly be.

the problem bad foreign key definition in entity framework schema. i'm still not sure why environments created working version of query , 1 environment created non working query. i'm going continue researching fixing foreign key definition solution.


Comments

Popular posts from this blog

java - How to Configure JAXRS and Spring With Annotations -

visual studio - TFS will not accept changes I've made to a Java project -

php - Create image in codeigniter on the fly -