public JobDTO Create(JobDTO modelDTO) { if (modelDTO != null) { return(JobAssembler.ToDTO(jobRepos.CreateJob(JobAssembler.ToEntity(modelDTO)))); } return(null); }
public JobDTO Create(JobDTO oJob) { if (oJob != null) { return(JobAssembler.ToDTO(oJobRepos.CreateJob(JobAssembler.ToEntity(oJob)))); } return(null); }
public JobDTO Get(int id) { JobDTO oJobDTO = null; if (id > 0) { oJobDTO = JobAssembler.ToDTO(jobRepos.GetJob(id)); } return(oJobDTO); }
public JobDTO Update(JobDTO oJobDTO) { JobDTO returnUserMap = null; if (oJobDTO != null && oJobDTO.JobID > 0) { oJobRepos.UpdateJob(0, JobAssembler.ToEntity(oJobDTO)); returnUserMap = oJobDTO; } return(returnUserMap); }
public JobDTO Update(JobDTO modelDTO) { JobDTO returnUserMap = null; if (modelDTO != null && modelDTO.JobID > 0) { jobRepos.UpdateJob(0, JobAssembler.ToEntity(modelDTO)); returnUserMap = modelDTO; } return(returnUserMap); }
public IEnumerable <JobDTO> Get() { IEnumerable <JobDTO> oJob = JobAssembler.ToDTOs(jobRepos.GetJobs()); if (oJob != null) { foreach (var item in oJob) { item.Count = oJob.Count(); } } return(oJob); }
public IEnumerable <JobDTO> GetJobsBySearch(string companyName, string jobTitle, string location, int?from, int?to) { int count = 0; var jobs = jobRepos.GetJobsBySearch(companyName, jobTitle, location, from, to, out count); IEnumerable <JobDTO> oJob = JobAssembler.ToDTOs(jobs); if (oJob != null) { foreach (var item in oJob) { var businessUsers = new BusinessUserMapBL().GetBusinessOwner(item.BusinessID).FirstOrDefault(); if (businessUsers != null) { item.Business.User = new UsersBL().Get(businessUsers.UserID); } item.Count = count; } } return(oJob); }
public IEnumerable <JobDTO> Get() { IEnumerable <JobDTO> oJob = JobAssembler.ToDTOs(oJobRepos.GetJobs()); return(oJob); }