Skip to content

Instantly share code, notes, and snippets.

View taylorkj's full-sized avatar

Ken Taylor taylorkj

  • University of California
  • Davis
View GitHub Profile
@taylorkj
taylorkj / gist:9012616
Last active March 27, 2021 14:16
How to use Dapper's new Table Valued Parameter (TVP) in C#
/*
I wasn't able to find a single example on how to actually use Dapper's new TVP, so I though I'd add one.
First of all, you will need to install the Dapper.TVP package from NuGet.
The main item to note is the need to create and populate a list of SqlDataRecords. This is then used to used as part of the
input parameter for Dapper's TableValueParameter.
The API is thus:
@taylorkj
taylorkj / gist:8031474
Created December 18, 2013 23:09
Here are a few Oracle to ANSI SQL translations I employed while working with an old Oracle script:
------------------------------------------------------------------------------------
-- Joins:
-- Oracle version:
SELECT
request.requestId
FROM
request,
incident,
changeRequest