public IEnumerable <ClubProductDto> GetRecent() { var repo = new ClubProductRepository(); var products = repo.GetRecentClubProducts(); return(products); }
public void Delete(UpdateClubProductCommand updatedClubProductCommand, int id) { var repo = new ClubProductRepository(); var updatedClubProduct = new ClubProduct { ClubId = updatedClubProductCommand.ClubId, ProductId = updatedClubProductCommand.ProductId, }; repo.DeleteClubProduct(updatedClubProduct, id); }
public void Create(AddClubProductCommand newClubProduct) { var repo = new ClubProductRepository(); repo.AddClubProduct(newClubProduct); }
public ClubProductDto Get(int clubProductId) { var repo = new ClubProductRepository(); return(repo.GetClubProduct(clubProductId)); }
public IEnumerable <ClubProductDto> GetAll() { var repo = new ClubProductRepository(); return(repo.GetAllClubProducts()); }