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; }
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; }