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 } }; }
private void SetupTemporaryData() { AlbumRepository album = new AlbumRepository(); var a = album.GetAll(); Photos = new List <Photo> { new Photo { PhotoId = Guid.NewGuid(), PhotoName = "img01", PhotoDate = DateTime.UtcNow, Description = "Foto 01", PhotoPath = "img01.jpg", AlbumId = a[0].AlbumId }, new Photo { PhotoId = Guid.NewGuid(), PhotoName = "img02", PhotoDate = DateTime.UtcNow, Description = "Foto 02", PhotoPath = "img02.jpg", AlbumId = a[1].AlbumId }, new Photo { PhotoId = Guid.NewGuid(), PhotoName = "img03", PhotoDate = DateTime.UtcNow, Description = "Foto 03", PhotoPath = "img03.jpg", AlbumId = a[0].AlbumId }, new Photo { PhotoId = Guid.NewGuid(), PhotoName = "img04", PhotoDate = DateTime.UtcNow, Description = "Foto 04", PhotoPath = "img04.jpg", AlbumId = a[1].AlbumId }, new Photo { PhotoId = Guid.NewGuid(), PhotoName = "img05", PhotoDate = DateTime.UtcNow, Description = "Foto 05", PhotoPath = "img05.jpg", AlbumId = a[0].AlbumId } }; }