Example #1
0
        public async Task <ApiResponse <Unit> > Execute(SqlHattemSession connection, AddTestItemTableCommand command)
        {
            var sqlConnection = await connection.GetConnectionAsync();

            await sqlConnection.ExecuteAsync(_script);

            return(ApiResponse.Ok());
        }
        public async Task <ApiResponse <TestItem> > Handle(SqlHattemSession connection, GetTestItemStructQuery query)
        {
            var sqlConnection = await connection.GetConnectionAsync();

            var value = await sqlConnection.QuerySingleAsync <TestItem>(_script, query);

            return(ApiResponse.Ok(value));
        }