Tag Archives: Code

EF query optimisation

We have a view that is very slow when you don’t use a filter on the name field. Everywhere in our stored procedures and (sub)queries we have this applied. In our web applicatie we use Entity Framework. The business layer … Continue reading

Posted in Development | Tagged , , , | Leave a comment

Linq to entities and CAST

We use an EDMX to access our database with Entity Framework. Before you comment: we have our reasons not to use code-first. Today we encountered a small problem with linq to entities and validating a varchar field that contains an integer … Continue reading

Posted in Development | Tagged , , , , | Leave a comment

Ignore integration tests when provider is missing

As an integration test I’ve written some unit tests for my MsAccess Data Access Layer. The provider I’m using is OleDb. It will be installed on every desktop machine, but not on our build server. The build fails because of … Continue reading

Posted in Uncategorized | Tagged , , , , | Leave a comment

AutoMapper pivot configuration

In our project we’re AutoMapper to transform a list of name – value pairs to objects with properties. It pivots by mapping the name of the pair to the property and assigning the value to it. We created an extension … Continue reading

Posted in Development | Tagged , | Leave a comment

XPath for robust message handling

Consider the xml message below Mapping this to a class would make it tightly coupled. Any change to the message would mean an update to the class. We expect some minor changes to the XSD / XML message but only … Continue reading

Posted in Development | Tagged , | Leave a comment

Week roundup

Last week recap and links: Rextester lets you edit, compile and run code online Safely simplify TFS queries with a Current iteration path, TFS iteration quidance / best practice Koffieschaap (dutch) internet nonsense about random facts Image courtesy of kanate … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

SQLite WARNING: Type mapping failed

The log of our product started showing SQLite warnings. We ignored them to focus on the release. Now it was time to repro and fix the warnings. After reading the verbose log we found the issue. Unknown datatypes are allowed … Continue reading

Posted in Development | Tagged , | Leave a comment