0
I got this Viewbag
ViewBag.LogAlteracao = _logAlteracaoRepository.Table.Where(log => log.OrderId == id).ToList();
That is the domain
public class LogAlteracao : EntityBase
{
public DateTime? Data { get; set; }
public string Acao { get; set; }
public string Localizador { get; set; }
public string Observacao { get; set; }
public int OrderId { get; set; }
}
When I try to popular be a table or a list in the View, so for example
<div class="margin-40-b">
<ul>
<li>
<label>Ação:</label>
@ViewBag.LogAlteracao.Acao
</li>
</ul>
</div>
Caught that mistake
Message='System.Collections.Generic.List "Core.domain.Logs.Logalteracao"' does not contain a definition for 'Action'
What might be going on? I’ve already removed Tolist() and still nothing.
NOTE: I put double quotes, because the < or > sign was hiding the rest of the message when quoted