public bool EditVacansy(Vacancy vac, string cat, string name, double salary) { try { repository.vacancies.Where(x => x.Name == vac.Name && x.Salary == vac.Salary) .FirstOrDefault().Name = name; repository.vacancies.Where(x => x.Name == vac.Name && x.Salary == vac.Salary) .FirstOrDefault().Salary = salary; repository.vacancies.Where(x => x.Name == vac.Name && x.Salary == vac.Salary) .FirstOrDefault().Category = cat; serializer.Serialize(repository); return(true); } catch (Exception) { return(false); } }
public string GetInfo(Vacancy vac) { return(vac.ToString()); }