How to see object in c#

Asked

Viewed 62 times

2

Hello, how can I see my object in c#, as the var_dump() in php, an example, to show the objects' orientations, follow my code:

    [HttpPost]
    [ValidateAntiForgeryToken]
    public ActionResult Create([Bind(Include = "IdFuncionario,Nome,IdDepartamento")] Funcionario funcionario)
    {
        if (ModelState.IsValid)
        {
            db.Funcionarios.Add(funcionario);
            db.SaveChanges();
            return RedirectToAction("Index");
        }
        return View(funcionario);
    }

in case, needed to see the object funcionario thank you.

  • You can use the breakpoint.

  • @Filipeoliveira as?

  • In Visual Studio, you can click on the left side of the screen behind the numbers and a red ball will appear. When the execution reaches that point, it will stop and you can hover over the object and explore it.

  • booa, got Aki @Filipeoliveira, I’m having a problem on the model, I’m going to ask a new question and see

  • @Filipeoliveira, take a look at the question I asked, see if you can help me: http://answall.com/questions/99048/erro-ao-creaturedados-chave-estrangeira-c-visual-studio

1 answer

2


You can use the Visual Studio breakpoint and see the state of your object.

Example:

inserir a descrição da imagem aqui

Browser other questions tagged

You are not signed in. Login or sign up in order to post.