public class Customer
{
public int CustomerID { get; set; }
public string Username { get; set; }
public string Password { get; set; }
public virtual ICollection<Question> Questions { get; set; }
}
public class Question
{
public int QuestionID { get; set; }
public string questiontext { get; set; }
public int CustomerID { get; set; }//klucz obcy
}
Mam takie dwie tabelki, z których wynika że jeden Klient może mieć wiele pytań. Wszystko gra, mogę dodawać pytania i klientów z poziomu wygenerowanego scaffoldingowo kodu. Natomiast nie wiem jak sprawić aby wyświetlało się pole "CustomerID" w klasie Question.
Po wygenerowaniu widoku widać tylko jedno pole "questiontext". Chciałbym mieć możliwość wprowadzania tego z poziomu przeglądarki www a nie z poziomu bazy danych, bo tam nie ma problemu.
Bardzo prosze o pomoc