public Models.DbModels.Jobs Update(Models.DbModels.Jobs model) { try { var job = this.getJobById(model.Id); job.ByName = model.ByName; _jobRepository.Update(job); return(_jobRepository.GetByID(model.Id)); } catch (Exception ex) { return(null); } }
public int Insert(Models.DbModels.Jobs model) { try { _jobRepository.Insert(model); return(model.Id); } catch (Exception ex) { // Do some logging stuff return(-1); } }