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
/* | |
Faster (probably due to no debugging attached by roslyn/linqpad), but same results overall | |
ICIC - 2.0579534 | |
ToLower - 3.2817216 | |
ToUpper - 3.2320578 | |
ToLowerInvariant - 2.7057271 | |
ToUpperInvariant - 2.7467674 | |
*/ | |
using System; |
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
<system.net> | |
<mailSettings> | |
<smtp from="info@email.co.uk"> | |
<network host="smtp.sendgrid.net" userName="u@d" password="p" /> | |
</smtp> | |
</mailSettings> | |
</system.net> |
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 Microsoft.EntityFrameworkCore; | |
using System.Linq; | |
namespace EFIncludeQueryable | |
{ | |
public class TestEntityA | |
{ | |
public int Id { get; set; } | |
public int TestEntityBId { get; set; } | |
public TestEntityB TestEntityB { get; set; } |
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.Linq; | |
namespace Cedita | |
{ | |
public static class ModelExtensions | |
{ | |
/// <summary> | |
/// Type-safe value copy from one object instance to another. | |
/// </summary> | |
/// <example> |
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
-- This will insert X years worth of data into a Date table. All fields are INT apart from DayName and DateTime (NVARCHAR(10) and DATE respectively) | |
-- Update 19/12 now uses ISO Week Number | |
-- Define start (base) and end dates | |
DECLARE @basedate DATETIME = '20111101', @enddate DATETIME = '20150101'; | |
DECLARE @days INT = 0, @date DATETIME = '20110101', @maxdays INT = DATEDIFF(dd, @basedate, @enddate); | |
WHILE @days <= @maxdays | |
BEGIN | |
SET @date = DATEADD(dd, @days, @basedate); |