1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- using Microsoft.EntityFrameworkCore;
- using System;
- using Repository.Entiies;
- using Microsoft.EntityFrameworkCore.Metadata.Builders;
- namespace Repository
- {
- public class TeamDataContext : DbContext
- {
- protected override void OnConfiguring(DbContextOptionsBuilder options)
- {
- options.EnableSensitiveDataLogging();
- var connetionString = $"Data Source={AppDomain.CurrentDomain.BaseDirectory}data.db";
- options.UseSqlite(connetionString).UseQueryTrackingBehavior(QueryTrackingBehavior.NoTracking);
- base.OnConfiguring(options);
- }
- public DbSet<TestResult> ProductResult { get; set; }
- public DbSet<ParamLog> ParamLogs { get; set; }
- public DbSet<StatisticsLog> StatisticsLogs { get; set; }
- public DbSet<Information> Informations { get; set; }
- public DbSet<SopFile> SopFiles { get; set; }
- public DbSet<LocalFileDb> LocalFile { get; set; }
- public DbSet<LocalFile2Db> LocalFile2 { get; set; }
- public DbSet<LocalFile3Db> LocalFile3 { get; set; }
- public DbSet<Account> Accounts { get; set; }
-
- public DbSet<Person> Persons { get; set; }
- public DbSet<House> Houses { get; set; }
- public DbSet<Quality> Qualitys { get; set; }
- public DbSet<OutofWork> OutofWorks { get; set; }
- public DbSet<ProStatus> ProStatus { get; set; }
- public DbSet<AllNumber> AllNumbers { get; set; }
- public DbSet<DeviceStatus> DeviceStatus { get; set; }
- }
- public class CustomerDataContext : DbContext
- {
- protected override void OnConfiguring(DbContextOptionsBuilder options)
- {
- options.EnableSensitiveDataLogging();
- var connetionString = $"Data Source=124.71.173.222;Initial Catalog=AIS20220504021055;Persist Security Info=True;User ID=sa;Password=jlkj123@;Encrypt=False";
- //$"Data Source=124.71.173.222;Initial Catalog=AIS20220504021055;User ID=sa;Password=jlkj123@;Encrypt=True;TrustServerCertificate=True";
- options.UseSqlServer(connetionString).UseQueryTrackingBehavior(QueryTrackingBehavior.NoTracking);
- base.OnConfiguring(options);
- }
- public DbSet<Table> Table { get; set; }//查看别人的数据库不能有s
- public DbSet<ICMO> ICMO { get; set; }
- public DbSet<t_PDABarCodeSign> t_PDABarCodeSign { get; set; }
- }
- }
|