Skip to content

Instantly share code, notes, and snippets.

@JerryNixon
JerryNixon / SqlUtilities.GetDotnetType.cs
Last active April 24, 2023 17:22
Convert SQL Type to .NET Type
using Microsoft.SqlServer.TransactSql.ScriptDom;
public static class SqlUtilities
{
public static string GetDotnetType(this SqlDataTypeOption sqlDataType, bool isNullable = false)
{
if (IsUnsupportedType())
{
return string.Empty;
}
@JerryNixon
JerryNixon / SqlBulkInsert.cs
Created January 25, 2023 19:35
Inserting as fast as I can.
using System.Data;
using System.Data.SqlClient;
internal class Program
{
static int threads = 0;
static int records = 0;
static int batch = 10_000;
static DateTime started = DateTime.Now;
@MelbourneDeveloper
MelbourneDeveloper / MultiTargeting.csproj
Created December 12, 2021 04:58
Multiple Target csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0, net45, netstandard2_0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
@davidfowl
davidfowl / .NET6Migration.md
Last active October 25, 2025 11:33
.NET 6 ASP.NET Core Migration
@davidfowl
davidfowl / MinimalAPIs.md
Last active September 25, 2025 20:44
Minimal APIs at a glance
@ZacharyPatten
ZacharyPatten / readme.md
Last active February 3, 2023 15:58
GitHub Repository Checklist (C#)

GitHub Repository Checklist (C#)

Have a repository on GitHub? Planning on making a repository on GitHub? This checklist is intended to introduce you to various features that may help you make the most of your GitHub repository with specific recommendations for C# repositories.

Checklist

These are only suggestions.
They may not be appropriate for all repositories.
They are in no particular order.
Click each item to expand for more information.

@RealDotNetDave
RealDotNetDave / .editorConfig
Last active October 7, 2025 15:52
.editorConfig by David (dotNetDave) McCarter - dotNetTips.com
####################################################################################################
# dotNetDave's (David McCarter) Editor Config - dotNetTips.com
# Updates to this file are posted quarterly at: https://bit.ly/EditorConfig5
# Updated May 1, 2025
# Code performance book is available at: https://bit.ly/DotNetCodePerf4
# Coding standards book is available at: https://bit.ly/CodingStandards8
####################################################################################################
root = true
@TessenR
TessenR / LinksDescription.md
Last active August 30, 2023 21:34
Source generators in action links
@juancarlospaco
juancarlospaco / unittest_doctests_template.py
Last active September 1, 2025 23:30
Unittest Templates
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Unittest with DocTests."""
import doctest
import unittest
@davidfowl
davidfowl / Example1.cs
Last active September 2, 2024 12:36
How .NET Standard relates to .NET Platforms
namespace Analogy
{
/// <summary>
/// This example shows that a library that needs access to target .NET Standard 1.3
/// can only access APIs available in that .NET Standard. Even though similar the APIs exist on .NET
/// Framework 4.5, it implements a version of .NET Standard that isn't compatible with the library.
/// </summary>INetCoreApp10
class Example1
{
public void Net45Application(INetFramework45 platform)