1

我在我的 asp.net 中加入时遇到问题.. 我有两个数据库表.. 名为 APPLICANT 和 Profile ...它们具有相同的字段.. 这意味着如果申请人中的姓氏为空,则姓氏已经在配置文件表。我已经将我的程序连接到申请人表..但是它有很多空字段必须从配置文件数据表中获取....对不起,我是 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; }
    }

感谢那些可以帮助我解决问题的人..

4

0 回答 0