public async Task <bool> DeleteLeagueImageAsync(long?leagueImageId, CancellationToken ct = default) { LeagueImageViewModel leagueImageToDelete = LeagueImageConverter.Convert(await this._leagueImageRepository.GetByIDAsync(leagueImageId, ct)); if (leagueImageToDelete == null) { return(false); } return(await this._leagueImageRepository.DeleteAsync(leagueImageToDelete.Id, ct)); }
public async Task <LeagueImageViewModel> GetLeagueImageByIdAsync(long?id, CancellationToken ct = default(CancellationToken)) { LeagueImageViewModel leagueImageViewModel = LeagueImageConverter.Convert(await this._leagueImageRepository.GetByIDAsync(id, ct)); return(leagueImageViewModel); }