Example #1
0
        public async Task <Episode> CreateAsync(Guid id, string title)
        {
            var dbEpisode = await _episodeRepository.GetByTitleAsync(title);

            if (dbEpisode != null)
            {
                throw new Exception("Episode with given title already exists");
            }
            return(new Episode(id, title));
        }