public List <Genre> GetAllGenres() { List <Genre> genres = new List <Genre>(); CoreToDataMapperService mapperService = new CoreToDataMapperService(); foreach (IGenre genreData in _genreRepository.GetAllGenres()) { genres.Add(mapperService.MapGenreDataToCore(genreData)); } return(genres); }
public Genre GetGenre(int id) { CoreToDataMapperService mapperService = new CoreToDataMapperService(); return(mapperService.MapGenreDataToCore(_genreRepository.GetGenre(id))); }