//------------------------------------------------------------------------------
//
// 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.
//
//------------------------------------------------------------------------------
#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(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(Expression> whereExpression) where TEntity : class
{
var context = ((IObjectContextAdapter)this).ObjectContext;
IObjectSet source = context.CreateObjectSet();
source.Delete(whereExpression);
}
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.Conventions.Remove();
modelBuilder.Configurations.Add(new Log_Operate_Mapping());
modelBuilder.Configurations.Add(new VW_Sys_User_Mapping());
}
public DbSet Log_Operate { get; set; }
public DbSet VW_Sys_User { get; set; }
}
}