Esempio n. 1
0
 public int DeleteJobSeeker(Models.JobSeekerViewModel jobSeeker)
 {
     using (JwadDbContext db = new JwadDbContext())
     {
         var delete = db.JobSeekers.Where(m => m.JobSeekerId == jobSeeker.JobSeekerId).SingleOrDefault();
         db.JobSeekers.Remove(delete);
         db.SaveChanges();
     }
     return(jobSeeker.JobSeekerId);
 }
Esempio n. 2
0
 public int DeleteJob(JobViewModel job)
 {
     using (JwadDbContext db = new JwadDbContext())
     {
         var delete = db.JobRequirements.Where(m => m.JobRequirementId == job.JobRequirementId).SingleOrDefault();
         db.JobRequirements.Remove(delete);
         db.SaveChanges();
     }
     return(job.JobRequirementId);
 }
Esempio n. 3
0
        public int AddJobSeeker(Models.JobSeekerViewModel model, string userId)
        {
            int jobSeekerId;

            using (JwadDbContext db = new JwadDbContext())
            {
                JobSeeker jobSeeker = new JobSeeker
                {
                    FirstName = model.FirstName,
                    LastName  = model.LastName,
                    Resume    = model.Resume
                };
                db.JobSeekers.Add(jobSeeker);
                db.SaveChanges();
                jobSeekerId = jobSeeker.JobSeekerId;
            }

            return(jobSeekerId);
        }
Esempio n. 4
0
        public int AddJob(JobViewModel model, string userId)
        {
            int jobId;

            using (JwadDbContext db = new JwadDbContext())
            {
                Job job = new Job
                {
                    JobCity        = model.JobCity,
                    JobDescription = model.JobDescription,
                    JobTitle       = model.JobTitle,
                    JobState       = model.JobState,
                    JobZipCode     = model.JobZipCode
                };
                db.JobRequirements.Add(job);
                db.SaveChanges();
                jobId = job.JobRequirementId;
            }

            return(jobId);
        }