using Microsoft.EntityFrameworkCore;
using Blazor_DotNet8_MovieApp.Models;

namespace Blazor_DotNet8_MovieApp.Data
{
    public class MovieReviewDbContext:DbContext
    {

        public MovieReviewDbContext(DbContextOptions<MovieReviewDbContext> options):base(options) 
        { 
            
        }
        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);

            SeedData.AddMovies(modelBuilder);
        }

        public DbSet<MovieModel> Movies { get; set; }
    }
}
