Example #1
0
        private TSqlModel BuildInitialEmptyModel()
        {
            var dummyModel = new TSqlModel(_version, _options);

            dummyModel.AddOrUpdateObjects("create procedure a as select 1", "dummy", new TSqlObjectOptions());
            dummyModel.DeleteObjects("dummy");
            return(dummyModel);
        }
Example #2
0
 //
 // Summary:
 //     Deletes any objects that were added to the model with the specified sourceName.
 //
 // Parameters:
 //   sourceName:
 //     A name to identify the source to be deleted, for example a fileName such
 //     as "MyTable.sql" or simply an alias like "dbo.Table". Scripts are cached
 //     and TSqlObjects are linked to the source name.
 //
 // Exceptions:
 //   System.ArgumentException:
 //     If the supplied sourceName is null or whitespace, or if it ends in ".xsd".
 //     Note: source names ending in ".xsd" are currently not supported. These relate
 //     to Xml Schema Collections and adding of these is currently not supported
 //     in the public API.
 //
 //   System.Runtime.Remoting.RemotingException:
 //     If communication with the Microsoft.SqlServer.Dac.Model.TSqlObjectService
 //     fails.
 public void DeleteObjects(string sourceName)
 {
     model.DeleteObjects(sourceName);
 }
Example #3
0
 private TSqlModel BuildInitialEmptyModel()
 {
     var dummyModel = new TSqlModel(_version, _options);
     dummyModel.AddOrUpdateObjects("create procedure a as select 1", "dummy", new TSqlObjectOptions());
     dummyModel.DeleteObjects("dummy");
     return dummyModel;
 }