c# - Replace foreign key with name -
so basically, i'm making website gets info , shows it.
currently have showing want, except i'm using id instead of name. id of user, , want replace id actual name.
if here
@foreach(var m in model.commits) { if(m.projectname == model.selectedproject) { <tr> <th>@m.userid</th> <th>@m.date</th> <th>@m.message</th> <th>@m.branchname</th> <th>@m.host</th> <th>@m.repositorypath</th> </tr> } }
i believe may have inside controller, i'm new mvc , these mo' fo'in' controllers driving me insane.
any great, thanks!
if 'name' property in 'commits' object should able display no problems @ all.
however, suspect may not straight-forward. m in mvc stands model, , in example you've provided commits class model view. controller should calling populate/hydrate 'commits' model. have @ that.
if not used mvc takes while used things not being together. though it'll make sense. problem of course when go code wasn't written in mvc , start shuddering.
good luck.
Comments
Post a Comment