Posts by Carlos Scherer • 111 points
8 posts
-
0
votes1
answer213
viewsA: How to create a WCF (.NET) POST type method that receives a String parameter from the URL and Stream via POST?
Below is an example with byte[]: Web.config <?xml version="1.0"?> <configuration> <appSettings> <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />…
-
4
votes3
answers679
viewsA: Entity Relationship Framework 1:N
You can do according to the example below using the "Include": vendaCtx.Vendas .Include(b => b.ItensVendas).ToList();
-
2
votes1
answer2998
viewsA: Error deserializing a Json I receive from the server
The Json posted above is having training problems. Below you can find an example of code that deserializes the properly formatted Json. The model classes: public class MinhaClasse { public string…
-
1
votes1
answer40
viewsA: Real type fields in bank with problems loading Model
You need to change the type of your Custody field from decimal to single, if in the bank is as real. Below is a link with data types in Sql Server and their equivalent in C#.…
-
0
votes1
answer230
viewsA: C# Join 3 tables using Linq?
You need to add a Select after Where created the structure you want, below follows an example with anonymous class: var result = db.LocTag.Where(x => x.Locais.Tipo_Local == Nome) .Select(c =>…
-
0
votes2
answers65
viewsA: Replace in undefined texts
You can use a regular expression: if (row["id_evento"].ToString() == "8") { sbConteudo.Replace("@@fdfgertyer", row["VALOR"].ToString()); } else if (row["id_evento"].ToString() == "10") {…
c#answered Carlos Scherer 111 -
1
votes2
answers662
viewsA: How to transform a json object array into a list of objects in c# using Json.NET
Here’s an example that might help: public class Minhaclasse { public string tempoexibicao { get; set; } public IEnumerable<Canetas> canetas { get; set; } } public class Canetas { public string…
-
0
votes2
answers61
viewsA: Static class system settings in the Entity Framework
You can create a configuration class as in the example below using constants: public static class Configuracoes { public const int CASAS_DECIMAIS = 2; public const int PRECISION = 16; } And then…