Esempio n. 1
0
        // Retrieves the data relevant to the Label
        public async Task <Label> CreateLabel(GlobalDbContext _context, int movieId, int studioId)
        {
            var movie = await _context.Movies.FindAsync(movieId);

            var studio = await _context.MovieStudios.FindAsync(studioId);

            var label = new Label()
            {
                MovieName = movie.Title, City = studio.City, Date = DateTime.Now
            };

            return(label);
        }
        public async Task <Label> GetEtikettData(GlobalDbContext _context, int movieId, int MovieStudioId)
        {
            var movie = await _context.Movies.FindAsync(movieId);

            var movieStudio = await _context.MovieStudio.FindAsync(MovieStudioId);

            var label = new Label()
            {
                DateRented = DateTime.Now, Title = movie.Title, City = movieStudio.City
            };


            return(label);
        }