public List <Bids> ReturnSelectedAuction(string id, paramTypeForCategory type) { switch (type) { case paramTypeForCategory.byId: return(bids.Where(x => x.Id == id).ToList()); case paramTypeForCategory.byUserId: return(bids.Where(x => x.UserId == id).ToList()); case paramTypeForCategory.byAuctionId: return(bids.Where(x => x.AuctionId == id).ToList()); default: return(bids.Where(x => x.Id == id).ToList()); } }
public List <Auctions> ReturnSelectedAuction(string id, paramTypeForCategory type) { switch (type) { case paramTypeForCategory.byId: return(auctions.Where(x => x.Id == id).ToList()); case paramTypeForCategory.byUserId: return(auctions.Where(x => x.CreatorId == id).ToList()); case paramTypeForCategory.bySelectedCategory: return(auctions.Where(x => x.CategoryId == id).ToList()); //case paramType.bySelectedCategoriesWithChildrens: // break; default: return(auctions.Where(x => x.Id == id).ToList()); } }