public async Task DeleteVacancy(long Id) { try { await Task.Run(() => ManageVacancy.DeleteVacancy(Id)); } catch (Exception) { throw; } }
public async Task <VacancyCreateModel> UpdateVacancy(VacancyCreateModel model) { try { VacancyCreateModel data = await Task.Run(() => ManageVacancy.Update(model)); return(model); } catch (Exception) { throw; } }
public async Task <VacancyCreateModel> CreateVacancy(VacancyCreateModel data) { try { VacancyCreateModel model = null; VacancyCreateModel res = await Task.Run(() => ManageVacancy.Insert(data)); return(model); } catch (Exception) { throw; } }
public async Task <VacancyCreateModel> GetVacancy(long Id) { try { VacancyCreateModel model = null; tblVacancy data = await Task.Run(() => ManageVacancy.GetVacancyDetails(Id)); model = data.ConvertToVacancyCreateModel(); return(model); } catch (Exception) { throw; } }
public async Task <List <CommentModel> > GetVacancyComments(long id) { try { List <CommentModel> data = null; tblVacancy res = await Task.Run(() => ManageVacancy.GetVacancyComments(id)); data = res.tblVacancyComments?.Select(a => a.tblComment?.ConvertToComment()).ToList(); return(data); } catch (Exception ex) { throw; } }
public async Task <List <VacancyCreateModel> > GetAllVacancies(CompanyModel model) { try { List <VacancyCreateModel> data = null; List <tblVacancy> res = await Task.Run(() => ManageVacancy.GetAllVacancies(model)); data = res.Select(x => x.ConvertToVacancyCreateModel()).ToList(); return(data); } catch (Exception ex) { throw; } }