12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- //------------------------------------------------------------------------------
- // <auto-generated>
- // This code was generated from a template.
- //
- // Manual changes to this file may cause unexpected behavior in your application.
- // Manual changes to this file will be overwritten if the code is regenerated.
- // </auto-generated>
- //------------------------------------------------------------------------------
- #pragma warning disable 1573
- namespace EMIS.Entities.Log
- {
- using System;
- using System.Data.Common;
- using System.Data.Entity;
- using System.Data.Entity.Infrastructure;
- using EntityFramework.Extensions;
- using System.Linq.Expressions;
- using System.Data.Entity.Core.Objects;
-
- public partial class EMISNewLogContext : DbContext
- {
- static EMISNewLogContext()
- {
- Database.SetInitializer<EMISNewLogContext>(null);
- }
-
- public EMISNewLogContext() : base("name=EMISNewLogContext") {
- var objectContext = (this as IObjectContextAdapter).ObjectContext;
-
- objectContext.CommandTimeout = 12000;
- base.Configuration.ProxyCreationEnabled = false;
- }
- public EMISNewLogContext(string nameOrConnectionString) : base(nameOrConnectionString) {
- var objectContext = (this as IObjectContextAdapter).ObjectContext;
-
- objectContext.CommandTimeout = 12000;
- base.Configuration.ProxyCreationEnabled = false;
- }
- protected void Delete<TEntity>(Expression<Func<TEntity, bool>> whereExpression) where TEntity : class
- {
- var context = ((IObjectContextAdapter)this).ObjectContext;
- IObjectSet<TEntity> source = context.CreateObjectSet<TEntity>();
- source.Delete(whereExpression);
- }
- protected override void OnModelCreating(DbModelBuilder modelBuilder)
- {
- modelBuilder.Conventions.Remove<IncludeMetadataConvention>();
- modelBuilder.Configurations.Add(new Log_Operate_Mapping());
- modelBuilder.Configurations.Add(new VW_Sys_User_Mapping());
- }
-
- public DbSet<Log_Operate> Log_Operate { get; set; }
- public DbSet<VW_Sys_User> VW_Sys_User { get; set; }
- }
- }
|