Skip to content

Instantly share code, notes, and snippets.

Sébastien Sougnez ssougnez

Block or report user

Report or block ssougnez

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View wp-dapper-11.cs
var result = (await connection.QueryAsync(sql,
new Type[] { typeof(A), typeof(B), typeof(C), typeof(D), typeof(E), typeof(F), typeof(G), typeof(H), typeof(I) },
objects =>
{
// Distributing logic here
})).FirstOrDefault();
View wp-dapper-12.cs
string sql = $@"SELECT [Id], [Title] FROM [Tracks] WHERE [Tracks].[Id] = 1;
SELECT [Id], [FirstName], [LastName] FROM [Drivers] WHERE [Id] IN (SELECT [DriverId] FROM [TrackWinners] WHERE [TrackWinners].[TrackId] = 1)";
using (var reader = await connection.QueryMultipleAsync(sql))
{
var track = reader.Read<Track>().FirstOrDefault();
if (track != null)
{
View wp-getting-started-with-webpack-4-06.js
"scripts": {
"build": "webpack --mode=development --watch",
"release": "webpack"
}
View wp-getting-started-with-webpack-4-07.js
module.exports = {
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: "babel-loader",
options: {
presets: ["env"]
View wp-getting-started-with-webpack-4-08.js
let arrayOne = [1, 2, 3];
let arrayTwo = [4, 5, 6];
let mergedArray = [...arrayOne, ...arrayTwo];
for (let number of mergedArray) {
console.log(number);
}
You can’t perform that action at this time.