Пример #1
0
        public static IDBObject Create(IDBSchema sch)
        {
            DBStoredProcedure sp = (DBStoredProcedure)sch.AddDBObject("CleanDataForTesting",
                                                                      new DBStoredProcedureDescriptor()
            {
                Parameters    = "",
                Body          = @"
    DELETE FROM Flyinline.UserDetail
	DELETE FROM Common.principalhasrole
	DELETE FROM Common.principal	
",
                ErrorHandling = true
            },
                                                                      new DBRevision(new DateTime(2019, 9, 20), 0, eDBRevisionType.Create));

            return(sp);
        }
Пример #2
0
        public override void CreateTimeLine()
        {
            var rev = new DBRevision(new DateTime(2016, 6, 10), 0, eDBRevisionType.Create);

            IDBSchema sch = AddSchema(DefaultSchemaName, new DBSchemaDescriptor());

            if (DefaultSchemaName != "dbo")
            {
                sch.AddRevision(new DBRevision(rev));
            }

            Drzava(sch);
            Grad(sch);
            Always(sch);

            DBStoredProcedure sp = (DBStoredProcedure)sch.AddDBObject("sp_Stora", new DBStoredProcedureDescriptor()
            {
                Parameters = "@broj int, @broj2 int, @tekst nvarchar(max)", Body = "SELECT Dijeljenje = @broj / @broj2, Tekst = @tekst", ErrorHandling = true
            },
                                                                      new DBRevision(new DateTime(2016, 9, 19), 0, eDBRevisionType.Create));
        }