Changes made by me
@model Pessoa; // já tentei module3.Models.Pessoa e todas as variacoes possiveis
@{
ViewData["Title"] = "Pessoa";
}
h2> @ViewData["Title"]</h2>
<p>Name: @model.Nome </p>
<p>Id:@model.Id</p>
namespace module3.Models
{
public class Pessoa
{
public int Id { get; set; }
public string Nome { get; set; }
}
}
public IActionResult Pessoa()
{
var pessoa = new Pessoa{Id=12,Nome="2324"};
return View();
}
/home/developer/Documentos/dotnet/module3/Views/Home/Pessoa.cshtml(1,6): error RZ1011: The 'page' directives value(s) must be separated by whitespace. [/home/developer/Documentos/dotnet/module3/module3.csproj]
/home/developer/Documentos/dotnet/module3/Views/Home/Pessoa.cshtml(6,14): error RZ2005:The 'model' directive must appear at the start of the line. [/home/developer/Documentos/dotnet/module3/module3.csproj]
/home/developer/Documentos/dotnet/module3/Views/Home/Pessoa.cshtml(6,19): error RZ1011:The 'model' directives value(s) must be separated by whitespace. [/home/developer/Documentos/dotnet/module3/module3.csproj]
/home/developer/Documentos/dotnet/module3/Views/Home/Pessoa.cshtml(7,11): error RZ2005:The 'model' directive must appear at the start of the line. [/home/developer/Documentos/dotnet/module3/module3.csproj]
/home/developer/Documentos/dotnet/module3/Views/Home/Pessoa.cshtml(7,10): error RZ2001:The 'model' directive may only occur once per document. [/home /developer/Documentos/dotnet/module3/module3.csproj]
/home/developer/Documentos/dotnet/module3/Views/Home/Pessoa.cshtml(7,16): error RZ1011:The 'model' directives value(s) must be separated by whitespace. [/home/developer/Documentos/dotnet/module3/module3.csproj]
0 Warning(s)
6 Error(s)