for a job application project, if jobseeker applies for a job what fields should necessary for an employer i am setting applications table for employes perspective to show applications to employer for a particular job. i am making table through code first approach,so accordingly
job id,emplyer id,jobseeker id,resume,applydate,status, this data i consider tobe necessary to hold in this table for that i use this code.
public class Application
{
[Key]
public int AppId { get; set; }
public DateTime ApplyDate { get; set; }
public int EmpId { get; set; }
public virtual Employer Employer { get; set; }
public int JobId { get; set; }
public virtual Jobs Job { get; set; }
public int CanId { get; set; }
public virtual Candidate Candidate { get; set; }
public byte Status { get; set; }
public ICollection Candidates { get; set; }
}
is this approach OK or need some corrections.moreover how may i get list of applicants who applied for a specific job.will this code work for getting list of candidates
Jignesh KumarPosted Jan 19, 2024, 4:38 AM
Hello Umain,
Please do below class and DBContext for your code first approach,
Classes:
DBContext :
Sam HobbsPosted Jan 18, 2024, 6:34 PM
I am not sure what the various fields are for. In my understanding, an applicant and a candidate are the same thing. Perhaps you could call your main table a positions tabel. That is one possibility but you can use whatever term is meaningful for you but I think your table here is not a table of applications. A position might have one and only one job and employer and an associated list of candidates. A candidate (applicant) might have an ApplyDate and fields such as phone number. A position might have a list of skills and an applicant might also have a list of skills. It is important to begin with a good database design, You can use GenMyModel to make an impressive database design if you want.
https://app.genmymodel.com
Personally what I do is to create a sample database then I use generate code for it. In ohter words, I use Database First. It is easier for me to understand.
Sachin SinghPosted Jan 18, 2024, 3:33 PM
Instead of using
bytefor theStatusfield, consider using anenum