protected static void Vacuum() { lock (_saveChangesLockObject) { GenericDbContext.Vacuum(); } }
public static void Sql(string sql) { lock (_saveChangesLockObject) { GenericDbContext.Sql(sql); } }
protected static void Drop() { lock (_saveChangesLockObject) { GenericDbContext.Truncate(); } }
protected GenericContext(string contextName) { _context = new GenericDbContext(contextName); _context.BeforeSetChanged += (sender, args) => OnBeforeSetChanged(args.Entity, args.State); _context.AfterSetChanged += (sender, args) => OnAfterSetChanged(args.Entity, args.State); FillContextRepositoriesAndLookup(); lock (Contextes) Contextes.Add(this); }