LINQ Method cannot be translated into a store expression.

by Arnold Matusz 17 11 2008

LINQ to Entities does not recognize the method 'Int32 ToInt32(System.String)' method, and this method cannot be translated into a store expression.


This is a shortcomming of LINQ to Entities, and indeed the ADO.NET Entity Framework at the current release! The reason for a similar exception message is that in queries on the Entity Framework, custom methods and extensions methods cannot be translated into store expressions.

There are workarounds to still enjoy LINQ to Entities and as an example please read the following: » Continue reading ...

What's hot in ASP.NET 3.5 SP1

by Arnold Matusz 22 10 2008

First of all it's worth mentioning that Microsoft brought enhancements to the ASP.NET AJAX Extensions. Now we can use a History control which allows us to use the back button to navigate back to a state before the last async postback happened.

Then there is Dynamic Data which is a framework that discoveres the data model and determines the UI which is best suited, dynamically, during runtime. This sounds weird but it can be of big help! Ex: When you try to display a DateTime value in a GridView, you can use a <asp:DynamicField ... /> which will automatically print your DateTime value nicely formatted. To achieve this with the Normal <asp:BoundField ... /> you needed to set HtmlEncode="false" and DataFormatString="{0:D}". If your DataField is a simple string, this will render a LiteralControl. Not only do these work in Read-Only mode, this also happens in Edit mode which can big of big help. » Continue reading ...

About Arnold Matusz

Arnold Matusz

My name is Arnold Matusz. I'm a web developer specialized in .NET technologies with a passion for photography and cars.

View Arnold Matusz's profile on LinkedIn

Who's amung us