我们如何从JobPostActivity访问Resume的属性 CandidateDetail?
//CandidateDetail
namespace CarrerPage
{
using System;
using System.Collections.Generic;
public partial class CandidateDetail
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage",
"CA2214:DoNotCallOverridableMethodsInConstructors")]
public CandidateDetail()
{
this.JobPostActivitys = new HashSet<JobPostActivity>();
}
public int RID { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string EmailID { get; set; }
public string PHONENUMBER { get; set; }
public int Experience { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage",
"CA2227:CollectionPropertiesShouldBeReadOnly")]
public virtual ICollection<JobPostActivity> JobPostActivitys { get; set;
}
}
}
//JobPostActivity
namespace CarrerPage
{
using System;
using System.Collections.Generic;
public partial class JobPostActivity
{
public int Id { get; set; }
public int RID { get; set; }
public Nullable<int> CandidateID { get; set; }
public Nullable<int> JobID { get; set; }
public Nullable<System.DateTime> Applydate { get; set; }
public string RESUME { get; set; }
public byte[] FileContent { get; set; }
public virtual CandidateDetail CandidateDetail { get; set; }
}
}
//Upload
<div class="form-group">
@Html.LabelFor(model=>model., htmlAttributes: new {
@class = "control-label col-md-2" })
<div class="col-md-10">
<input type="file" name="files" required />
@Html.ValidationMessageFor(model=> model.)
</div>
</div>
https://www.itsolutions-inc.com/news-and-training/article/entity-framework-6-database-first-versus-code-first/ 在该模型附近,如何访问候选人详细信息中的Resume属性?