using Microsoft.EntityFrameworkCore;
using ShipyardDataBaseImplement.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ShipyardDataBaseImplement
{
    public class ShipyardDataBase:DbContext
    {
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            if (optionsBuilder.IsConfigured == false)
            {
                optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-M8EKKPQ\SQLEXPRESS;Initial Catalog=ShipyardDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
            }
            base.OnConfiguring(optionsBuilder);
        }
        public virtual DbSet<Detail> Details { set; get; }
        public virtual DbSet<Ship> Ships { set; get; }
        public virtual DbSet<ShipDetail> ShipDetails { set; get; }
        public virtual DbSet<Order> Orders { set; get; }
        public virtual DbSet<Client> Clients { set; get; }

        public virtual DbSet<Message> Messages { set; get; }
        public virtual DbSet<Implementer> Implementers { set; get; }
    }

}

