Exemplo n.º 1
0
        private static IEnumerable <ExampleProcModel> ExecuteExampleProc(string name, int number)
        {
            IDbApi db = new SqlDbApi(TestDbApi.ConnStringTest);

            return(db.ExecuteReader("ExampleProc", DeserialiseExampleProcModel, CommandType.StoredProcedure,
                                    new SqlParameter("@name", name),
                                    new SqlParameter("number", number)));
        }
Exemplo n.º 2
0
        private static void DropAndCreateDb()
        {
            var master = new SqlDbApi(ConnStringMaster);

            master.ExecuteNonQuery(
                "if exists (select * from sys.databases where name='" + DbName + "') " +
                "drop database " + DbName + "; " +
                "create database " + DbName + ";");
        }