Posts by Carlos • 35 points
4 posts
-
-1
votes1
answer62
viewsQ: String to Json data conversion for Collections in mongodb
When I query a Collection in mongodb, it returns a field of the string type. [{"id":"1325","nome":produto1,"estoque":"10"}] But I need to make this field a Json. It is possible to do this in the…
-
2
votes1
answer74
viewsQ: Instantiating a class "x" from another class "y" inherited by the class "x"
If I have a class Diretor who inherits from the class Funcionario, so I say a direct is also an employee. Public class Diretor : Funcionario{} Diretor diretor = new Diretor(); But I’m allowed to…
-
0
votes2
answers105
viewsQ: Moq function in controller test
After a few hours trying, I arrived at this test code, but still I could not understand well the function of the Mock, and without it works the same way. Note. The intention is to learn TDD with…
-
1
votes1
answer48
viewsQ: Understanding how it works to convert an Object to Json
I have a PUT route that receives a Json in the variable "edits" and from what I understand, in C# it ends up being an object. I was researching a way to receive the file correctly and through some…