コード例 #1
0
 private static ShowGenre MapRowToObj(ShowGenreRow row)
 {
     var existingItem = new ShowGenre
     {
         ShowGenreId = row.ShowGenreId,
         ShowId = row.ShowId,
         GenreId = row.GenreId
     };
     existingItem.IsDirty = false;
     return existingItem;
 }
コード例 #2
0
ファイル: FakeDatabase.cs プロジェクト: entrotech/talent
        private static List<ShowGenreRow> LoadShowGenres()
        {
            var maxShowGenreId = 0;

            var list = new List<ShowGenreRow>();
            ShowGenreRow showGenre;

            showGenre = new ShowGenreRow
            {
                ShowGenreId = ++maxShowGenreId,
                ShowId = 1,
                GenreId = 1
            };
            list.Add(showGenre);

            showGenre = new ShowGenreRow
            {
                ShowGenreId = ++maxShowGenreId,
                ShowId = 2,
                GenreId = 2
            };
            list.Add(showGenre);

            showGenre = new ShowGenreRow
            {
                ShowGenreId = ++maxShowGenreId,
                ShowId = 2,
                GenreId = 6
            };
            list.Add(showGenre);

            showGenre = new ShowGenreRow
            {
                ShowGenreId = ++maxShowGenreId,
                ShowId = 2,
                GenreId = 7
            };

            list.Add(showGenre);
            return list;
        }