Skip to content

Instantly share code, notes, and snippets.

View JonathanMagnan's full-sized avatar

Jonathan Magnan JonathanMagnan

View GitHub Profile
@JonathanMagnan
JonathanMagnan / tattoo-contest.md
Last active March 21, 2020 23:07
[$300 BONUS] - Eye Catchy Tattoo Contest (Arms)

[$300 BONUS] - Eye Catchy Tattoo Contest (Arm)

Like many people here, I'm looking for a tattoo that will represent me. In fact, two tattoos (one per lower arm), but you can only design the right one.

Please go here for an HTML version of this markdown text: https://gist.github.com/JonathanMagnan/64a93e9ac25bc83e9accfc54fff42fb0

BONUS: $200 for second place

BONUS: $100 for third place

// @nuget: EntityFramework
using System;
using System.Data.Entity;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
public class Program
// Description: HAP - Load (From File)
// Website: https://html-agility-pack.net/
// Run: https://dotnetfiddle.net/EsvZyg
// @nuget: HtmlAgilityPack
using System;
using System.Xml;
using HtmlAgilityPack;
@JonathanMagnan
JonathanMagnan / 02Mjoy-efe-bulk-update-entity-graph.cs
Created October 5, 2018 21:18
EFE - Bulk-Update - Entity Graph
// Description: EFE - Bulk-Update - Entity Graph
// Website: https://entityframework-extensions.net/
// Run: https://dotnetfiddle.net/02Mjoy
// @nuget: EntityFramework
// @nuget: EntityFramework.SqlServerCompact
// @nuget: Microsoft.SqlServer.Compact
// @nuget: Z.EntityFramework.Extensions
using System.Data.Entity;

test{:target="_blank"}

test2

{:class="abc"}

public class Program {
public static void Main(){
int i = 2 + 2;
System.Console.WriteLine("Hello World:" + i);
}
}
@JonathanMagnan
JonathanMagnan / test1.schema
Last active October 9, 2017 14:25
test-sql-with-schema
CREATE Table
// From File
var doc = new HtmlDocument();
doc.Load(filePath);
// From String
var doc = new HtmlDocument();
doc.LoadHtml(html);
// From Web
var url = "http://html-agility-pack.net/";
// Single Key
ctx.BulkUpdate(customers, operation => operation.ColumnPrimaryKeyExpression =
customer => customer.Code);
// Surrogate Key (with anonymous type)
ctx.BulkUpdate(customers, operation => operation.ColumnPrimaryKeyExpression =
customer => new { customer.Code1, customer.Code2, customer.Code3 });