Posts by Matheus Rizzi • 132 points
14 posts
-
0
votes0
answers40
viewsQ: Nhibernate error in group by
I’m studying NHibernate and is giving me an error in group by, but at first it is generating me wrong sql, do not know why, follow the code below SQL and its structure. string hql = "select…
-
0
votes2
answers289
viewsA: Read xml file ready
Access the site http://xmltocsharp.azurewebsites.net/ and paste the contents of your Xml there, done this takes the classes c#, which it generates for you. Then just load the contents of your xml…
-
0
votes2
answers131
viewsA: Which component can I use as a table in c#?
For table is the Datagridview, and if you have a List of your object, just set the datasource of the dataGridView, example: datagridview1.datasource = lista Or else, if create manually, you need to…
-
1
votes1
answer1816
viewsA: c# Json returning backslash
This bar is only visible in debug mode, if you put it to print the contents of this variable that contains the JSON string, will exit without the bar. To work with JSON, I advise you to use…
-
0
votes2
answers1248
viewsA: C# XML digital signature, poorly formed Reference element
Try it with this code: private XmlDocument AssinarXml(string arquivo, string tagAssinatura, string tagAtributoId, X509Certificate2 x509Cert) { StreamReader SR = null; try { SR =…
-
2
votes2
answers235
viewsA: How to change the appearance of the form according to the operating system?
I don’t know this, what you can do to get around this problem is to remove the edges of your form and leave background images, IE, you will create the image of your screen and set as…
-
1
votes3
answers636
viewsA: Object Reference not set to an instance of an Object. - Json
The problem is because within the Example class, you have another class with the name properties, and you just instilled the Example class, but you would also have to instantiate the properties…
-
0
votes1
answer340
viewsA: Error passing parameter to proc with Dapper
All right, I don’t use @ to pass the parameters but :, but you have to see your sql to understand it, but here is an example below: #region Sql var sql = @" INSERT INTO FIS_GERENCIADOCTOFISCAL…
-
3
votes2
answers487
viewsA: Take only the return value in a Dapper
With Dapper you have several ways to do this, below are examples: //Aqui você está tipando o retorno em string e já pegando o primeiro resultado var uf =…
-
0
votes2
answers106
viewsA: How to implement an interface to secure a specific contract?
So buddy, interface is not to force class properties, but methods, to make other trade models have the same properties, you have to create an abstract class and inherit it in the others, and an…
-
-1
votes2
answers100
viewsA: SRP- Principle of Single Liability
So, from my experience and the way I’ve been working, I would create 3 objects. Request, Pedidorepositorio and Pedidoservico, and so would leave a responsibility for each and would also already use…
-
1
votes3
answers655
viewsA: Controller Base Dependency Injection
In dependency injection, you can inject a builder. Ex: container.RegisterType<IDbGerenciador, DbGerenciador>(new InjectionConstructor(Provedor.PostgreSql, _conexaoString));…
-
0
votes3
answers861
viewsA: String reading Json format for c#
Hello, all right? Next, take your json and put it on this site: http://json2csharp.com/ It will generate the classes in c#, then you just do the deserialization. var objetoRetornado =…
-
3
votes4
answers2605
viewsA: Breakpoint in visual studio does not load at debug
I also went through this, and it’s only natural that you click on the properties of the project, in the Build tab, click Advanced, and in the "Debbuging Information" option, leave as Full.…