public ActionResult AllAdd() { var allAdds = _Context.Advertisements.Where(a => a.IsPaid == true); var allAddViewModel = new AllAddViewModel() { Advertisements = allAdds }; return(View(allAddViewModel)); }
public ActionResult SearchDistrict(CreateAddViewModel cavm) { var districtId = cavm.DistrictId; var districtWiseAdvertisement = _Context.Advertisements.Where(a => a.DistrictId == districtId && a.IsPaid == true); var allAdd = new AllAddViewModel() { Advertisements = districtWiseAdvertisement }; return(View(allAdd)); }
public ActionResult SearchThana(CreateAddViewModel cavm) { var thanaId = cavm.ThanaId; var thanaWiseAdvertisments = _Context.Advertisements.Where(a => a.ThanaId == thanaId && a.IsPaid == true).ToList(); var allAdd = new AllAddViewModel() { Advertisements = thanaWiseAdvertisments }; return(View(allAdd)); }