我试图在表格中只包括谁创建或提交了学校请求。我正在 Visual Studio 2012 中使用 C# MVC4 进行开发。我是这个 mvc c# 的新手,所以我相信这对所有人来说都很容易。
这是我的视图 details.cshtml:
@model Models.Schools
/*I get an error when i do this, it looks like i can only include one model, as school name, and address gets to be undefined.*/
@model Models.whoCreated
//this is coming from Models.Schools
school name:
address:
/*this is coming from Models.WhoCreated
Schools and WhoCreated are both tables in db and share common id.
any idea on how to achieve this? also i would like to show this field only to admin, and I am using Membership.getUser (all valid users are stored in my db, with admin or just regular user status)*/
created by: