示例#1
0
        /// <summary>
        /// Create a DbCommand object given a command tree.
        /// </summary>
        /// <param name="commandTree">command tree for the statement</param>
        /// <returns>a command object</returns>
        internal virtual DbCommand CreateCommand(DbCommandTree commandTree)
        {
            DbCommandDefinition commandDefinition = CreateCommandDefinition(commandTree);
            DbCommand           command           = commandDefinition.CreateCommand();

            return(command);
        }
示例#2
0
 /// <summary>
 /// Creates the command definition wrapper.
 /// </summary>
 /// <param name="wrappedCommandDefinition">The wrapped command definition.</param>
 /// <param name="commandTree">The command tree.</param>
 /// <returns><see cref="DbCommandDefinitionWrapper"/> object.</returns>
 public virtual DbCommandDefinitionWrapper CreateCommandDefinitionWrapper(DbCommandDefinition wrappedCommandDefinition, DbCommandTree commandTree)
 {
     return new DbCommandDefinitionWrapper(
         wrappedCommandDefinition,
         commandTree,
         (cmd, def) => new DbCommandWrapper(cmd, def));
 }
		/// <summary>
		/// Initializes a new instance of the DbCommandDefinitionWrapper class.
		/// </summary>
		/// <param name="wrappedCommandDefinition">The wrapped command definition.</param>
		/// <param name="commandTree">The command tree.</param>
		/// <param name="commandCreator">The command creator delegate.</param>
		public DbCommandDefinitionWrapper(
			DbCommandDefinition wrappedCommandDefinition,
			DbCommandTree commandTree,
			Func<DbCommand, DbCommandDefinitionWrapper, DbCommand> commandCreator)
		{
			this.wrappedCommandDefinition = wrappedCommandDefinition;
			this.commandTree = commandTree;
			this.commandCreator = commandCreator;
		}
 public ProxyDbCommandDefinition(DbCommandDefinition proxiedDbCommandDefinition)
 {
     ProxiedDbCommandDefinition = proxiedDbCommandDefinition;
 }
示例#5
0
 public LegacyDbCommandDefinitionWrapper(Legacy.DbCommandDefinition wrappedDbCommandDefinition)
 {
     _wrappedDbCommandDefinition = wrappedDbCommandDefinition;
 }
 public GlimpseProfileDbCommandDefinition(DbCommandDefinition innerCommandDefinition, ProviderStats stats)
 {
     InnerCommandDefinition = innerCommandDefinition;
     Stats = stats;
 }
示例#7
0
 /// <summary>
 /// Create the default DbCommandDefinition object based on the prototype command
 /// This method is intended for provider writers to build a default command definition
 /// from a command.
 /// Note: This will clone the prototype
 /// </summary>
 /// <param name="prototype">the prototype command</param>
 /// <returns>an executable command definition object</returns>
 public virtual DbCommandDefinition CreateCommandDefinition(DbCommand prototype)
 {
     return(DbCommandDefinition.CreateCommandDefinition(prototype));
 }
		/// <summary>
		/// Creates the command definition wrapper.
		/// </summary>
		/// <param name="wrappedCommandDefinition">The wrapped command definition.</param>
		/// <param name="commandTree">The command tree.</param>
		/// <returns>
		/// The <see cref="DbCommandDefinitionWrapper"/> object.
		/// </returns>
		public override DbCommandDefinitionWrapper CreateCommandDefinitionWrapper(
			DbCommandDefinition wrappedCommandDefinition,
			DbCommandTree commandTree)
		{
			return new CachingCommandDefinition(wrappedCommandDefinition, commandTree);
		}
 internal EFCachingCommandDefinition(DbCommandDefinition wrappedCommandDefinition, DbCommandTree commandTree)
     : base(wrappedCommandDefinition, commandTree, (cmd, def) => new EFCachingCommand(cmd, def))
 {
     this.GetAffectedEntitySets(commandTree);
 }
示例#10
0
 /// <summary>
 /// Creates the command definition wrapper.
 /// </summary>
 /// <param name="wrappedCommandDefinition">The wrapped command definition.</param>
 /// <param name="commandTree">The command tree.</param>
 /// <returns>
 /// The <see cref="DbCommandDefinitionWrapper"/> object.
 /// </returns>
 public override DbCommandDefinitionWrapper CreateCommandDefinitionWrapper(DbCommandDefinition wrappedCommandDefinition, DbCommandTree commandTree)
 {
     return new DbCommandDefinitionWrapper(wrappedCommandDefinition, commandTree, (cmd, def) => new EFTracingCommand(cmd, def));
 }
 public LegacyDbCommandDefinitionWrapper(Legacy.DbCommandDefinition wrappedDbCommandDefinition)
 {
     _wrappedDbCommandDefinition = wrappedDbCommandDefinition;
 }