Posts by SantanaFire • 442 points
20 posts
-
0
votes4
answers4254
viewsA: Why should we avoid returning error codes?
Why should we avoid returning error codes? The question is old, but the dilemma is present! The extension of the article proves the vast knowledge of the author, something praiseworthy, even more…
-
0
votes1
answer46
viewsQ: Doubt about layers needed in a simple Gateway made in STS
I made a web service json/Rest that plays the role of a gateway, the client sends the request to an endpoint, but the gateway replicates the request for various services. In it, I just pass the…
-
0
votes1
answer44
viewsA: Fluentnhibernate is mounting the wrong query
After searching, find out that you need to specify the column name in the mapping, thus: public PessoaMapa() { Table("PESSOA"); (...) HasMany(x => x.Documentos).KeyColumn("CodPess"); HasMany(x…
-
2
votes1
answer44
viewsQ: Fluentnhibernate is mounting the wrong query
Dear, After mapping the tables, I consulted one of them to return the information "daughter". The sql was mounted correctly, however the name of the key column (PK) was changed which made an error…
-
1
votes1
answer401
viewsQ: Log in Separate Files [Log4net]
I use Log4net in my application. I need to create a configuration that "deposit" everything from level="INFO" in a file and everything that is light="ERROR" in another file. But even following the…
-
1
votes1
answer121
viewsQ: Capture Tracesql query in LINQ c#
I have an appointment in LINQ and I need to capture the generated sql, but I did not succeed. The conversion to Objectquery that I found does not work. What is missing? var sqlConsulta = (from a in…
-
0
votes2
answers682
viewsA: View of XSD
Option I liked best, with three types: text Plain, arvóre and diagram, with the option to generate documentation automatically: Wmhelp Xmlpad.
-
1
votes1
answer2079
viewsQ: Generate C# class from XSD
I need to generate the class from a file. XSD. Though I’ve tried everything I know (used . net tool: xsd.exe, httputility.net and other . Cs generators) did not succeed. I think the mistake is in…
-
4
votes1
answer562
viewsQ: View SQL at Runtime
Is there a monitor that shows me the sql script at runtime? For example, during debug, I would like to see how the script was mounted by the following code: var q = (from proc in…
-
1
votes1
answer56
viewsA: Httputility.Htmldecode(), Html to Txt intention (at least), can anyone help?
Ok! Friends, thank you for your efforts. I have found a satisfactory solution that I demonstrate below: System.Text.RegularExpressions.Regex.Replace(text, "<(.|\n)*?>", string.Empty); This…
-
1
votes1
answer56
viewsQ: Httputility.Htmldecode(), Html to Txt intention (at least), can anyone help?
I’m getting a record whose content is this below (in HTML): <p style="text-align: justify;"><span style="font-family: times new roman,times;"><span…
-
2
votes1
answer1533
viewsQ: Compiler error or code error?
I came across the following case and do not know if it is . NET error or error in my implementation, same syntax (see image below). condenacaoInsert.qtd_ano_pena = null;…
-
0
votes1
answer71
viewsQ: Oracleexception is not fired!
Someone has already come across the following problem: When an error occurs that should be of the type Oracleexception, but in its place an exception is triggered, then the oracle treatment is not…
-
2
votes1
answer4074
viewsQ: The 'X' type initializer has triggered an exception
While trying to run the line below, I get the following error message: An Exception of type 'System.Typeinitializationexception' occurred in Programa.exe but was not handled in user code. Additional…
-
3
votes1
answer537
viewsQ: How not to serialize some attributes in Restful calls (C# + WCF + JSON)?
In the example below, how to do not serialize an attribute. I believe I’m looking for the equivalent of java syntax: For classes: @Jsonignoreproperties(ignoreUnknown = true); For attributes:…
-
0
votes2
answers4228
viewsA: Authentication in Restful Service
After researching the subject, I discovered a path that not only elucidates but complements the general knowledge on this subject. So for those who wish to learn more about: Security in Web API, go…
-
4
votes2
answers4228
viewsQ: Authentication in Restful Service
In the example below, I need to pass a login pair/password, because the REST service requires authentication (Basic Authentication). So how should I pass this information in the section below?…
-
2
votes7
answers2949
viewsA: How to use multiple SQL commands (in the case delete on ORACLE) in one line only on C#?
A more robust solution and complete what I suggest. Knowing that everything has a quick, easy and wrong solution, better waste time on implementation for quality gain! #region Controle de Transação…
-
1
votes1
answer118
viewsQ: Error ORA-12571 encountedred in Windows Service
I have a C# system running as a windows service, with Windows Server 2012R2. Eventually when the service tries to communicate with the database (to perform a query or make an Insert, for example)…
-
7
votes1
answer625
viewsQ: Does using Timer class features (System.Timers) cost a Windows service?
I need to do a database check once a day. I’m thinking of using the class Timer (System.Timers). The time contactor feature will burden/lock the other system services? This solution is advisable…