学校のリクエストを作成または送信した人だけをフォームに含めようとしています。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: