Replacing method calls with expressions at runtime with Linqkit and the Entity Framework

LINQ to Entities does not recognize the method ‘…’ method, and this method cannot be translated into a store expression. Does this sound familiar to you? It’s a common issue that many developers face, as evidenced by the astronomical amount of questions about it on stackoverflow.com The problem To understand why this happens, you must first realize that Linq To Entities - the thing that produces the SQL statements for you - never really executes your C# code. So when you write: ...

March 9, 2013 · 11 min · Alexander Moerman

Multilanguage support in C# with code first and the Entity Framework

One of the downsides of living in Belgium is that everything needs to be available in multiple languages, given that we’re sporting no less than 3 official languages. This has consequences for developers too, and today I would like to expand a little on how to deal with these consequences. There is already decent language support in the most popular programming languages, such as resource bundles in Java and resources in .Net. However, a question that often goes unanswered is how to to translate dynamic resources. What if you want to maintain a list of Products where one product can have separate names in English, French, Dutch, etc. Furthermore, what if you want do the same thing for the product description? What if you want to dynamically add other languages later on? ...

January 11, 2013 · 10 min · Alexander Moerman