/// <summary> /// /// </summary> /// <param name="request"></param> /// <returns></returns> public int SaveRequest(ManpowerRequest request) { request.DateCreated = DateTime.Now; _dbContext.ManpowerRequest.Add(request); _dbContext.SaveChanges(); return(request.Id); }
public int Add(ManpowerRequest manpowerRequest) { manpowerRequest.Status = 0; _ctx.Add(manpowerRequest); _ctx.SaveChanges(); var id = manpowerRequest.Id; return(id); }
public void CreateRequest(ManpowerRequestVm manpowerRequestVm) { var manpowerRequest = new ManpowerRequest() { Description = manpowerRequestVm.Description, HiringManagerId = manpowerRequestVm.HiringManagerId, Level = manpowerRequestVm.Level, Status = 0, Title = manpowerRequestVm.Title }; var id = _manpowerRequestRepository.Add(manpowerRequest); this.CreateJob(id); }