Posts by Joel Ramos Michaliszen • 252 points
4 posts
-
1
votes2
answers426
viewsA: Class relationship - (C# Entityframework)
Probably the EF is inferring that there is some PK, so it does not keep the convention for Complextypes, then how did not post the complete code of the class Endereço can’t tell which property is…
-
4
votes2
answers368
viewsA: Is the calculation of RENAVAN correct? Can you improve something?
An improvement in the code: public static bool IsRENAVAM(string RENAVAM) { if (string.IsNullOrEmpty(RENAVAM.Trim())) return false; var sequencia = new int[]{ 3, 2, 9, 8, 7, 6, 5, 4, 3, 2 }; var…
-
1
votes2
answers702
viewsA: Decimal value conversion error in Insert C#
Since the fields are integer and Numeric(8,2), there is no need of quotation marks, try this format: strQuery += string.Format(CultureInfo.InvariantCulture," VALUES ({0},{1:0.00},{2:0.00},{3})",…
-
3
votes3
answers131
viewsA: LINQ Anonymized Type as parameter
I suggest you create a Extension Method of object to this end, since it will guarantee reuse, it follows the code of the Extension method: public static class ObjectExtensions { public static object…