Blagodat/Hardik/Conect/Conector.cs

34 lines
1.4 KiB
C#
Raw Normal View History

2025-04-25 07:00:58 +00:00
//using Demka_Snova_1.Hardik.Conect.Dao;
//using Microsoft.EntityFrameworkCore;
2025-04-22 07:25:24 +00:00
2025-04-25 07:00:58 +00:00
//namespace Demka_Snova_1.Hardik.Conect;
2025-02-11 10:23:14 +00:00
2025-04-25 07:00:58 +00:00
//public class AppDbContext : DbContext
//{
// protected override void OnConfiguring(DbContextOptionsBuilder oB)
// {
// oB.UseSqlServer("Server=45.67.56.214,5421;Database=user16;User Id=user16;Password=dZ28IVE5;",
// options => options.EnableRetryOnFailure());
// }
2025-04-22 07:25:24 +00:00
2025-04-25 07:00:58 +00:00
// public DbSet<SotrudnikDao> sotrudnik { get; set; }
// public DbSet<uslugiDao> uslugi { get; set; }
// public DbSet<ordersDao> orders { get; set; }
// public DbSet<KlientDao> klient { get; set; }
// public DbSet<historyDao> history { get; set; }
2025-02-11 10:23:14 +00:00
2025-04-25 07:00:58 +00:00
// protected override void OnModelCreating(ModelBuilder mb)
// {
// mb.Entity<KlientDao>().ToTable("Klient", "Demo_Blago").HasKey(klient => klient.Code);
// mb.Entity<KlientDao>().Property(klient => klient.Code).ValueGeneratedOnAdd();
2025-03-05 09:12:58 +00:00
2025-04-25 07:00:58 +00:00
// mb.Entity<ordersDao>().ToTable("orders", "Demo_Blago").HasKey(orders => orders.ID);
// mb.Entity<ordersDao>().Property(orders => orders.ID).ValueGeneratedOnAdd();
2025-03-05 09:12:58 +00:00
2025-04-25 07:00:58 +00:00
// mb.Entity<uslugiDao>().ToTable("uslugi", "Demo_Blago").HasKey(uslugi => uslugi.id);
2025-03-05 09:12:58 +00:00
2025-04-25 07:00:58 +00:00
// mb.Entity<SotrudnikDao>().ToTable("Sotrudnik", "Demo_Blago").HasKey(sotrudnik => sotrudnik.ID);
2025-03-05 09:12:58 +00:00
2025-04-25 07:00:58 +00:00
// mb.Entity<historyDao>().ToTable("history", "Demo_Blago").HasKey(history => history.id);
// }
//}