public async Task CreateSkill(SkillTagDto skill) { using (var unitOfWork = UnitOfWorkProvider.Create()) { skillService.Create(skill); await unitOfWork.Commit(); } }
public async Task <ActionResult> Create(SkillTagDto dto) { if (ModelState.IsValid) { await SkillFacade.CreateSkill(dto); return(RedirectToAction("Index")); } return(View(dto)); }
public async Task <IEnumerable <JobOfferDto> > GetOffersBySkill(int skillId) { using (UnitOfWorkProvider.Create()) { SkillTagDto skill = await skillService.GetAsync(skillId, false); if (skill == null) { return(null); } return(await jobOfferService.GetBySkills(skill)); } }
public async Task <bool> EditSkill(SkillTagDto skill) { using (var uow = UnitOfWorkProvider.Create()) { if ((await skillService.GetAsync(skill.Id, false)) == null) { return(false); } await skillService.Update(skill); await uow.Commit(); return(true); } }
public async Task <IList <JobOfferDto> > GetBySkills(SkillTagDto skillTagDto) { SkillTag skillTag = Mapper.Map <SkillTag>(skillTagDto); return(Mapper.Map <IList <JobOfferDto> >(await(jobOfferRepository.GetBySkill(skillTag)))); }