/// <summary> /// Rechercher une liste d'offres /// </summary> /// <returns></returns> public List <Offer> GetSearchedOffers(string searchOffer) { OfferQuery oq = new OfferQuery(_context); List <Offer> listOffers = oq.GetAll().Where(x => x.Title.ToUpper().Contains(searchOffer.ToUpper())).ToList(); foreach (Offer o in listOffers) { o.Status = GetStatus(o.StatusId); o.Postulations = GetPostulationsFromOffer(o); } return(listOffers); }
/// <summary> /// Récupérer une liste de Offers en base /// </summary> /// <returns>Offers List</returns> public List <Offer> GetAllOffers() { OfferQuery oq = new OfferQuery(_context); List <Offer> listOffers = oq.GetAll().ToList(); foreach (Offer o in listOffers) { o.Status = GetStatus(o.StatusId); o.Postulations = GetPostulationsFromOffer(o); } return(listOffers); }
public List <Offer> GetAllOffer() { OfferQuery oq = new OfferQuery(contexte); return(oq.GetAll().ToList()); }