コード例 #1
0
 public static Genre GetGenre(string name) {
     var genre = Kernel.Instance.MB3ApiRepository.RetrieveGenre(name);
     if (genre == null || genre.Name == null) {
         genre = new Genre(GetGenreId(name), name.Trim());
     }
     return genre;
 }
コード例 #2
0
 public static Genre GetGenre(string name)
 {
     Guid id = GetGenreId(name);
     var genre = Kernel.Instance.ItemRepository.RetrieveItem(id) as Genre;
     if (genre == null || genre.Name == null) {
         genre = new Genre(id, name.Trim());
         Kernel.Instance.ItemRepository.SaveItem(genre);
     }
     return genre;
 }