123456789101112131415161718192021222324252627282930313233343536 |
- using CommonStorage.Model;
- using MySql.Data.MySqlClient;
- using System.Data.Common;
- using System.Data.Entity;
- namespace CommonStorage
- {
- //[DbConfigurationType(typeof(MySqlEFConfiguration))]
- public class MyDb : DbContext
- {
- /// <summary>
- /// 日志
- /// </summary>
- public DbSet<Log> logs { get; set; }
- public DbSet<User> users { get; set; }
- public DbSet<AppConfig> appConfigs { get; set; }
- public DbSet<Device> devices { get; set; }
- public DbSet<TestData> testDatas { get; set; }
- public DbSet<ReportConfig> reportConfigs { get; set; }
- public DbSet<TpsConfig> tpsConfigs { get; set; }
-
- public MyDb(DbConnection existingConnection, bool contextOwnsConnection)
- : base(existingConnection, contextOwnsConnection)
- {
- }
- protected override void OnModelCreating(DbModelBuilder modelBuilder)
- {
- base.OnModelCreating(modelBuilder);
- }
- }
- }
|