using Domain;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;

namespace Infrastructure
{
    public class SimpleContext : DbContext {

        public DbSet<MyShip> MyShips { get; set; }
        public DbSet<ShipCertificate> ShipCertificate { get; set; }
        public DbSet<Document> Document { get; set; }

        public DbSet<ShipFishVisit> ShipFishVisits { get; set; }

        public SimpleContext(DbContextOptions options) : base(options)
        {

        }

        protected override void OnConfiguring(DbContextOptionsBuilder optionBuilder)
        {
            object p = optionBuilder.UseLazyLoadingProxies();

            base.OnConfiguring(optionBuilder);
        }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.ApplyConfigurationsFromAssembly(Assembly.GetExecutingAssembly());
        }


    }
   
}
