public void ValidateLead(ValidatedLead ValidatedLead) { if (ValidatedLead == null) { throw new ArgumentNullException(nameof(ValidatedLead)); } _context.ValidatedLead.Add(ValidatedLead); }
public void DeleteValidatedLead(ValidatedLead lead) { if (lead == null) { throw new ArgumentNullException(nameof(lead)); } _context.ValidatedLead.Remove(lead); }
public IEnumerable <Company> MatchingLead(ValidatedLead Lead) { List <Company> AcceptedCompany = new List <Company>(); foreach (var company in _context.Company) { for (int i = 0; i < company.AvailableJobs.Count; i++) { for (int j = 0; j < Lead.Jobs.Count; i++) { if (company.AvailableJobs[i].Job == Lead.Jobs[j].Job) { AcceptedCompany.Add(company); } } } } AcceptedCompany.OrderByDescending(o => o.Accomplished / o.Left) .ThenBy(o => o.HitRate); return(AcceptedCompany); }