This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel.DataAnnotations; | |
using System.Linq; | |
using System.Text; | |
namespace ConsoleApp { | |
public static class EnumExtensions { | |
// enumに適用されている属性を取得 | |
public static IEnumerable<TAttribute> GetApplied<TAttribute>(this Enum value) where TAttribute : Attribute { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Data; | |
using System.Data.SqlClient; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Dapper; | |
namespace ConsoleApp { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Data.SqlClient; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Text; | |
namespace ConsoleApp { | |
class Program { | |
private static SqlConnection Connect() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Data.SqlClient; | |
using System.Linq; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
using Dapper; | |
namespace UnitTest { | |
public static class AssertHelper { | |
public static void IsSequenceEqualTo<T>(this IEnumerable<T> first, IEnumerable<T> second) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Web; | |
namespace WebApp.App_Code { | |
public class SampleHttpHandler : IHttpHandler { | |
public bool IsReusable { | |
get { return false; } | |
} | |
public void ProcessRequest(HttpContext context) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using Newtonsoft.Json; | |
namespace ConsoleApp { | |
class User { | |
[JsonProperty("first_name")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Serialization; | |
namespace ConsoleApp { | |
class User { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Data.SqlClient; | |
using System.Linq; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
using Dapper; | |
namespace UnitTest { | |
[TestClass] | |
public class Test { | |
private readonly string _connectionString = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use tempdb; | |
create table #Fruit( | |
Name nvarchar(3), | |
Price int, | |
constraint PK_Fruit primary key(Name)); | |
go | |
create proc #UpsertFruit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Net; | |
using System.Text; | |
using System.Web; | |
using DotNetOpenAuth.AspNet.Clients; | |
using DotNetOpenAuth.Messaging; | |
using Newtonsoft.Json.Linq; |