public IList <ProductAdvertisement> GetAllBannerByType(ProductAdvertisementType productAdvertisementType) { switch (productAdvertisementType) { case ProductAdvertisementType.SliderBanner: return(GetAllByType(productAdvertisementType)); case ProductAdvertisementType.WomenSquareBanner: return(GetAllByType(productAdvertisementType)); case ProductAdvertisementType.MenSquareBanner: return(GetAllByType(productAdvertisementType)); case ProductAdvertisementType.UnisexSquareBanner: return(GetAllByType(productAdvertisementType)); case ProductAdvertisementType.MidVertRectangleBanner: break; case ProductAdvertisementType.LgVertRectangleBanner: break; case ProductAdvertisementType.MidHorRectangleBanner: break; case ProductAdvertisementType.LgHorRectangleBanner: break; default: break; } return(null); }
private IList <ProductAdvertisement> GetAllByType(ProductAdvertisementType type) { return(this.EntityDbSet.Where(b => b.AdType == type && b.IsActive).ToList()); }
public ProductAdvertisement GetProductAdvertisementByType(ProductAdvertisementType type) { return(this.EntityDbSet.FirstOrDefault(b => b.AdType == type && b.IsActive)); }