Skip to content

Instantly share code, notes, and snippets.

View kalebpederson's full-sized avatar

Kaleb Pederson kalebpederson

View GitHub Profile
@kalebpederson
kalebpederson / ClientProgram.cs
Created August 18, 2012 00:42
WCF Rest Client/Server
using System;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Web;
namespace WcfRestClient
{
[DataContract(Namespace="")]
namespace YourNamespace
{
/// <summary>
/// Uses the Name value of the <see cref="ColumnAttribute"/> specified to determine
/// the association between the name of the column in the query results and the member to
/// which it will be extracted. If no column mapping is present all members are mapped as
/// usual.
/// </summary>
/// <typeparam name="T">The type of the object that this association between the mapper applies to.</typeparam>
public class ColumnAttributeTypeMapper<T> : FallbackTypeMapper
define(['dep'], function(dep) {
function aFunc() {
// do something with dep as captured in closure
}
return {
myFunc: aFunc
};
});
@kalebpederson
kalebpederson / EfConcurrencyTests.cs
Created July 25, 2017 17:07
Queries involving DATETIME behave differently between SQL Server versions 2013 & 2016
using System;
using System.Configuration;
using System.Data.Entity.Infrastructure;
using System.Data.SqlClient;
using System.Linq;
using NUnit.Framework;
namespace DbEfConcurrencyTests
{
[TestFixture]