public void CreateGridData(JobModel model) { if (model != null) { var job = Mapper.Map<Job>(model); this.jobsRepo.SaveOrUpdate(job); } }
public void DeleteGridData(JobModel model) { if (model != null) { var job = this.jobsRepo.FindOne(new ByIdSpecify<Job>(model.Id)); this.jobsRepo.Delete(job); } }
public void UpdateGridData(JobModel model) { if (model != null) { var job = this.jobsRepo.FindOne(new ByIdSpecify<Job>(model.Id)); Mapper.Map(model, job); this.jobsRepo.SaveOrUpdate(job); } }