internal Job GetById(int id) { Job job = _jobsRepository.GetById(id); if (job == null) { throw new Exception("Invalid Id"); } return(job); }
internal Job GetById(int id) { Job data = _jrepo.GetById(id); if (data == null) { throw new Exception("Invalid ID"); } return(data); }
internal Job GetById(int id) { var data = _repo.GetById(id); if (data == null) { throw new Exception("Invalid Id Aye"); } return(data); }
public Job GetById(int id) { Job foundJob = _repo.GetById(id); if (foundJob == null) { throw new Exception("Invalid Id"); } return(foundJob); }
internal Job GetById(int id, Profile userInfo) { var data = _repo.GetById(id); if (data.CreatorId != userInfo.Id || data == null) { throw new Exception("No Permission or Invalid ID!"); } return(data); }
public ActionResult <Job> Get(int id) { try { return(Ok(_JobsRepo.GetById(id))); } catch (Exception e) { return(BadRequest(e.Message)); } }
public void EditJob(Job job) { var original = jobsRepository.GetById(b => b.JobId == job.JobId); jobsRepository.Update(original, job.AutoMapObject <Job, DB.Job>()); }