static private KeySkillStats GetSkillWithStats(Key_Skills skill, List <HHVacancyModel> vacanciesHasSkill, int allVacanciesCnt) { return(new KeySkillStats() { KeySkill = skill, Price = SalaryInfo.GetAverageSalary(vacanciesHasSkill), FrequencyInPercent = decimal.Divide(vacanciesHasSkill.Count, allVacanciesCnt) * 100 }); }
public decimal GetAverageRegionSalary(int areaId) { var vacs = _vacancyDataHandlerService.GetRegionVacancies(_vacancyDataHandlerService.GetVacanciesWithSalary(_vacancyService.Vacancies), areaId); if (!vacs.Any()) { return(-1); } return(SalaryInfo.GetAverageSalary(vacs)); }
public decimal GetAverageSalary([FromServices] IVacancyDataHandlerService service) { return(SalaryInfo.GetAverageSalary(service.GetVacanciesWithSalary(_vacancyService.Vacancies))); }