私のasp.netへの参加に問題があります.. APPLICANTとProfileという名前の2つのデータベーステーブルがあります...それらには同じフィールドがあります..つまり、申請者の姓がnullの場合、姓はすでに含まれていますプロファイル テーブル。私はすでに自分のプログラムを申請者テーブルに接続しています..しかし、プロファイルデータテーブルから取得する必要がある非常に多くのnullフィールドがあります....申し訳ありませんが、私はasp.netの初心者です...
コントローラーのコードは次のとおりです。
public View Result Index()
{
var applicants = (from a in db.APPLICANTs
select a).ToList();
return View(applicants);
}
ここに私の文脈があります:
public partial class APPLICANT
{
public int APPLICANT_ID { get; set; }
public Nullable<int> Profile_id { get; set; }
public string APPLICANT_LastName { get; set; }
public string APPLICANT_FirstName { get; set; }
public string APPLICANT_MiddleName { get; set; }
public string APPLICANT_Address { get; set; }
public string APPLICANT_City { get; set; }
public string APPLICANT_ZipCode { get; set; }
public string APPLICANT_Phone { get; set; }
public string APPLICANT_Email { get; set; }
}
public partial class Profile
{
public int PROFILE_ID { get; set; }
public string Applicant_LASTNAME { get; set; }
public string Applicant_FIRSTNAME { get; set; }
public string Applicant_MIDDLENAME { get; set; }
public string Applicant_EMAIL { get; set; }
public string Applicant_PHONE { get; set; }
public string Applicant_ADDRESS { get; set; }
public string Applicant_ZIPCODE { get; set; }
public string Applicant_CITY { get; set; }
}
私の問題を助けることができる人に感謝..