Posts by Gustavo Gois Cardoso • 331 points
9 posts
-
3
votes4
answers1120
viewsA: Error Deserialize Json in C#Template
Create that class public class Json { public List<Models.Comanda> Comanda { get; set; } } Uses it as type Deserializeobject var PedidosApi = JsonConvert.DeserializeObject<Json>(json);…
-
0
votes2
answers468
viewsA: Nameerror in Postscontroller#index | uninitialized Constant Postscontroller::Post
You didn’t import your Post model into the Controller, so it can’t identify the class. class PostController < ApplicationController require 'models/post' def index @posts = Post.All end end…
-
0
votes1
answer1601
viewsA: Undefined local variable or method
I did it that way and it worked: class ProdutItem attr_reader :item, :price_unit, :qtde def initialize(item, price_unit, qtde) @item = item @price_unit = price_unit @qtde = qtde end def calc_qtde…
rubyanswered Gustavo Gois Cardoso 331 -
1
votes1
answer46
viewsA: Mapping 1 to 0, 0 to 1
You created the entity Depositotransferenciaconta to mediate the link between Depositotransferencia and Bill, however, from what I understood of your rule: "a user will register the…
-
1
votes1
answer196
viewsA: Create tree structure from a database query
class Program { static void Main(string[] args) { var rows = Tabela.GetData(); var nodes = Node.GetClientes(rows); Console.ReadLine(); } public class Node { public string Text { get; set; } public…
-
3
votes2
answers372
viewsQ: Collate Mongodb
I need to make an auto complete that consumes a Mongodb database. The words can be written with or without accent, uppercase or lowercase, that is, I need to define a collate in the Ngo that allows…
-
4
votes2
answers2228
viewsQ: Update in array in Mongodb
{ "_id" : "55dcb404478e7227203d3a65", "Nome" : "Grupo Familia", "Pessoas" : [ { "PessoaId" : "55dcb425478e72207833e970", "Nome" : "Carlos", "Habilidades" : [ { "HabilidadeId" :…
-
1
votes1
answer199
viewsA: Update Mongodb in array
I figured out how to do it, in case anyone’s interested follow: var update = Update.AddToSet("Pessoas.$.Habilidades", novaHabilidade.ToBsonDocument()); var retorno =…
-
3
votes1
answer199
viewsQ: Update Mongodb in array
{ "_id" : "55dcb404478e7227203d3a65", "Nome" : "Grupo Familia", "Pessoas" : [ { "PessoaId" : "55dcb425478e72207833e970", "Nome" : "Carlos", "Habilidades" : [ { "HabilidadeId" :…