public void AddSeason(Season season) { var command = GetCommand("AddSeason", System.Data.CommandType.StoredProcedure); AddParameter(command, "@ProgrammeId", season.Programme.Id); AddParameter(command, "@SeasonNumber", season.SeasonNumber); AddParameter(command, "@EpisodeCount", season.EpisodeCount); AddParameter(command, "@FinishYear", season.FinishYear); ExecuteNonQueryChecked(command); }
public void AddSeason(int programmeId, int seasonNumber, int episodeCount, DateTime finishYear) { var season = new Season() { Programme = new Programme() { Id = programmeId }, SeasonNumber = seasonNumber, EpisodeCount = episodeCount, FinishYear = finishYear }; _seasonRepository.AddSeason(season); }