Skip to content

Instantly share code, notes, and snippets.

View strvmarv's full-sized avatar

Paul M strvmarv

View GitHub Profile
using System.Data;
using System.Data.Entity;
using System.Data.Entity.Core.Objects;
using System.Data.SqlClient;
namespace Extensions
{
public static class EntityFrameworkExtensions
{
public static void BulkCopy(
public static class HtmlHelperExtensions
{
private static readonly char Separator = '/';
private static readonly string TemplateFolder = HttpContext.Current.Server.MapPath("~/App/templates");
private static readonly IViewEngine ViewEngine = new HandlebarsRazorViewEngine();
public static MvcHtmlString RenderEmber(this HtmlHelper helper, string path = "", bool noTemplateName = false)
{
if (HttpRuntime.Cache[path] == null)
{

Keybase proof

I hereby claim:

  • I am strvmarv on github.
  • I am strvmarv (https://keybase.io/strvmarv) on keybase.
  • I have a public key whose fingerprint is D202 D386 C327 C2A7 2579 91D3 D00A 97C8 008D CF43

To claim this, I am signing this object:

using System;
class C
{
static void Main()
{
const long x = -1;
long y = x;
Console.WriteLine(unchecked(long.MinValue / x));
Console.WriteLine(unchecked(long.MinValue / y));
using Dapper;
using Oracle.ManagedDataAccess.Client;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
public class OracleDynamicParameters : Dapper.SqlMapper.IDynamicParameters {
private static Dictionary<SqlMapper.Identity, Action<IDbCommand, object>> paramReaderCache = new Dictionary<SqlMapper.Identity, Action<IDbCommand, object>>( );
@strvmarv
strvmarv / Maybe.cs
Created February 25, 2014 01:54 — forked from bradwilson/Maybe.cs
public struct Maybe<T>
{
public static readonly Maybe<T> NoValue;
public Maybe(T value, bool hasValue = true) : this()
{
HasValue = hasValue;
Value = value;
}