Ejemplo n.º 1
0
 public IDataResult <List <Advert> > GetAll()
 {
     try
     {
         return(new DataResult <List <Advert> >(_advertDal.GetList(), true));
     }
     catch (Exception error)
     {
         return(new DataResult <List <Advert> >(error.Message));
     }
 }
Ejemplo n.º 2
0
 public IDataResult <List <Advert> > GetByRealEstate(int realEstateId)
 {
     return(new SuccessDataResult <List <Advert> >(_advertDal.GetList(a => a.RealEstateId == realEstateId).ToList()));
 }