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

in Linq to Entity, you should use the methods in your query which is supported by your provider to convert them to expression tree to run on your Data Base side. all providers must support some methods by default called Canonical Functions (Read More Here), and also you can define your user defined function and … Read more

C# int, Int32 and enums

The underlying type is indeed the same, but the compiler depends on the type to be as the exact alias. This is a compilation error based on parsing. I took a look at C# grammar specification and the underlying types defined there as tokens based on the alias (e.g. ‘int’, ‘unit’… etc.). The parser expects … Read more

Double parse with culture format

First, you need to know which culture this number is from, then: CultureInfo culture = new CultureInfo(“de”); // I’m assuming german here. double number = Double.Parse(“202.667,40”, culture); If you want to parse using the current thread culture, which by default is the one set for the current user: double number = Double.Parse(“202.667,40”, CultureInfo.CurrentCulture);