using Microsoft.EntityFrameworkCore;
using Shop.Entites;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Shop.Context
{
    public class ShopContext : DbContext
    {
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {

            //  string con = @"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=" +Environment.CurrentDirectory  + "\\Shop.mdf;Integrated Security=True;Connect Timeout=30";

            string con = "Server=.;Database=Shop_db;Trusted_Connection = Yes;Integrated Security=True;TrustServerCertificate=True";
            optionsBuilder.UseSqlServer(con, null);
        }
        public ShopContext() : base()
        {

        }
   

        public DbSet<User> Users { get; set; }


    }
}
