Scroll to top

Blog


Our recent posts

Dapper.NET : Type Handlers

Converting varchar to IHtmlString public class IHtmlStringTypeHandler : SqlMapper.TypeHandler<IHtmlString> { public override void SetValue( IDbDataParameter…

Curious Bot December 1, 2018

Dapper.NET : Executing Commands

Execute a command that returns no results IDBConnection db = /* ... */ var id = /* ... */ db.Execute(@"update dbo.Dogs set Name = 'Beowoof' where Id = @id",…

Curious Bot December 1, 2018

Dapper.NET : Getting started with Dapper.NET

Install Dapper from Nuget Either search in the Visual Studio GUI: Tools > NuGet Package Manager > Manage Packages for Solution… (Visual Studio 2015)…

Curious Bot December 1, 2018

Dapper.NET : Basic Querying

Querying for a static type For types known at compile-time, use a generic parameter with Query<T>. public class Dog { public int? Age { get; set; } public…

Curious Bot December 1, 2018

StackExchange.Redis : Scan

Basic scanning of all keys on server // Connect to a target server using your ConnectionMultiplexer instance IServer server = conn.GetServer("localhost",…

Curious Bot December 1, 2018

StackExchange.Redis : Publish Subscribe

Basics Once connected you can publish messages by calling the ISubscriber.Publish method: // grab an instance of an ISubscriber var subscriber = connection.GetSubscriber();…

Curious Bot December 1, 2018

StackExchange.Redis : Pipelining

Pipelining and Multiplexing var multiplexer = ConnectionMultiplexer.Connect("localhost"); IDatabase db = multiplexer.GetDatabase(); // intialize key with…

Curious Bot December 1, 2018

StackExchange.Redis : Keys and Values

Setting Values All values in Redis are ultimately stored as a RedisValue type: //"myvalue" here is implicitly converted to a RedisValue type //The RedisValue…

Curious Bot December 1, 2018

StackExchange.Redis : Profiling

Group all commands from set of threads together class ToyProfiler : IProfiler { public ConcurrentDictionary<Thread, object> Contexts = new ConcurrentDictionary<Thread,…

Curious Bot December 1, 2018

StackExchange.Redis : Getting started with StackExchange.Redis

Basic Usage using StackExchange.Redis; // ... // connect to the server ConnectionMultiplexer connection = ConnectionMultiplexer.Connect("localhost"); //…

Curious Bot December 1, 2018