Skip to content

Instantly share code, notes, and snippets.

View dampee's full-sized avatar

Damiaan dampee

View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Unit Test Method</Title>
<Author>Siôn J. Lewis</Author>
<Description>Adds a unit test method with comments based on the AAA (Arrange,Act,Assert) pattern</Description>
<HelpUrl>https://msdn.microsoft.com/en-us/library/ms165394.aspx</HelpUrl>
<Shortcut>utest</Shortcut>
<SnippetTypes>
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 March 9, 2023 12:39 — forked from evgeny-myasishchev/generate_dto.sql
TSQL script to generate POCO/DTO from database table
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