Skip to content

Instantly share code, notes, and snippets.

View Humberfrench's full-sized avatar

Humberto Gonçalves de Almeida Humberfrench

View GitHub Profile
@Humberfrench
Humberfrench / HttpClient.js
Created August 3, 2021 19:23 — forked from randyburden/HttpClient.js
Simple JavaScript HTTP Client. Supports GET and POST.
httpClient = {
get: function( url, data, callback ) {
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function () {
var readyState = xhr.readyState;
if (readyState == 4) {
callback(xhr);
}
@Humberfrench
Humberfrench / ColumnAttributeTypeMapper.cs
Last active June 29, 2018 14:02 — forked from senjacob/ColumnAttributeTypeMapper.cs
Map column names with class properties in Dapper-dot-net using ITypeMap and CustomAttributes
namespace YourNamespace
{
/// <summary>
/// Uses the Name value of the ColumnAttribute specified, otherwise maps as usual.
/// </summary>
/// <typeparam name="T">The type of the object that this mapper applies to.</typeparam>
public class ColumnAttributeTypeMapper<T> : FallbackTypeMapper
{
public static readonly string ColumnAttributeName = "ColumnAttribute";