BuildItemsAsync() public method

Builds the given items on the database.
This method will first drop objects marked for Drop or DropAndCreate. It then creates or alters objects marked for Create, DropAndCreate, or Alter. If any one script fails to build, the entire transaction will be rolled back.
public BuildItemsAsync ( IEnumerable items ) : Task
items IEnumerable The items to build.
return Task
示例#1
0
        /// <summary>
        /// Builds the given items on the database.
        /// </summary>
        /// <remarks>
        /// The build is executed in the order of the dependency graph, using the
        /// <see cref="Connection"/> and <see cref="Transaction"/> of this object.
        ///
        /// If any one script fails to build, the entire transaction will be rolled back.
        /// </remarks>
        /// <param name="items">The items to build.</param>
        /// <returns>A flag that indicates whether all scripts were executed successfully.</returns>
        public async Task <bool> BuildAsync(IEnumerable <BuildItem> items)
        {
            var b = new Build.Build(Connection, Transaction, Logger);

            return(await b.BuildItemsAsync(items));
        }
 /// <summary>
 /// Builds the given items on the database.
 /// </summary>
 /// <remarks>
 /// The build is executed in the order of the depedency graph.
 /// </remarks>
 /// <param name="items">The items to build.</param>
 public async Task BuildAsync(IEnumerable<BuildItem> items)
 {
     Build.Build b = new Build.Build();
     await b.BuildItemsAsync(items, this);
 }