Skip to content

Instantly share code, notes, and snippets.

Avatar

Damiaan dampee

View GitHub Profile
View RetryHelperAsync.cs
using System;
using System.Configuration;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using log4net;
namespace Utils
{
@dampee
dampee / generate_dto.sql
Last active Nov 13, 2020 — forked from evgeny-myasishchev/generate_dto.sql
TSQL script to generate POCO/DTO from database table
View generate_dto.sql
DECLARE @tableName NVARCHAR(MAX), @schemaName NVARCHAR(MAX), @className NVARCHAR(MAX)
--------------- Input arguments ---------------
SET @tableName = 'MyTableName'
SET @schemaName = 'dbo'
SET @className = @tableName + 'Dto'
--------------- Input arguments end -----------
DECLARE tableColumns CURSOR LOCAL FOR
SELECT cols.name, cols.system_type_id, cols.is_nullable FROM sys.columns cols