Exemple #1
0
        private void SetupTemporaryUserData()
        {
            var user = new UserRepositories();
            var u    = user.GetAll();

            var photo = new PhotoRepository();
            var p     = photo.GetAll();
            var album = new AlbumRepository();
            var a     = album.GetAll();

            Comments = new List <Comment>
            {
                new Comment
                {
                    Id      = Guid.NewGuid(),
                    Content = "Album01",
                    Date    = DateTime.UtcNow,
                    UserId  = u[0].Id,
                    PhotoId = null,
                    AlbumId = a[0].AlbumId
                },
                new Comment
                {
                    Id      = Guid.NewGuid(),
                    Content = "img01",
                    Date    = DateTime.UtcNow,
                    UserId  = u[1].Id,
                    PhotoId = p[0].PhotoId,
                    AlbumId = null
                },
                new Comment
                {
                    Id      = Guid.NewGuid(),
                    Content = "Album02",
                    Date    = DateTime.UtcNow,
                    UserId  = u[0].Id,
                    PhotoId = null,
                    AlbumId = a[1].AlbumId
                },
                new Comment
                {
                    Id      = Guid.NewGuid(),
                    Content = "img02",
                    Date    = DateTime.UtcNow,
                    UserId  = u[1].Id,
                    PhotoId = p[1].PhotoId,
                    AlbumId = null
                },
                new Comment
                {
                    Id      = Guid.NewGuid(),
                    Content = "img03",
                    Date    = DateTime.UtcNow,
                    UserId  = u[0].Id,
                    PhotoId = p[0].PhotoId,
                    AlbumId = null
                }
            };
        }
Exemple #2
0
        private void SetupTemporaryData()
        {
            UserRepositories user = new UserRepositories();
            var u = user.GetAll();

            //PhotoRepository photo = new PhotoRepository();
            //var a1 = photo.GetPhotoByAlbumId1();
            //var a2 = photo.GetPhotoByAlbumId2();
            Albums = new List <Album>
            {
                new Album {
                    AlbumId = Guid.NewGuid(), AlbumName = "Album 01", AlbumDate = DateTime.UtcNow, Description = "Album 01", UserId = u[0].Id
                },
                new Album {
                    AlbumId = Guid.NewGuid(), AlbumName = "Album 02", AlbumDate = DateTime.UtcNow, Description = "Album 02", UserId = u[1].Id
                }
            };
        }