Skip to content

Instantly share code, notes, and snippets.

// This....
QueryByAttribute qba = new QueryByAttribute("entityName")
{
ColumnSet = new ColumnSet("fieldA", "fieldB")
};
// There may be several of these lines
qba.AddAttributeValue("fieldC", "fieldCValue");
@TeaDrivenDev
TeaDrivenDev / Csharp_vs_Fsharp.md
Last active January 4, 2016 10:09
Comparison of a small MSCRM plugin implemented in C# and F#

As requested by several people on Twitter after I mentioned that the C# implementation is 27 lines, and the F# version saves only two lines over this (which is mainly because there isn't much to save at all). In the mean time, I actually managed to shave off two more lines because the last method call incidentally returns void.

Please note that the plugin as such is not very useful; I'm mainly trying to get an F# plugin to run within MSCRM in the first place.

C#:

	using Microsoft.Xrm.Sdk;
	using System;
	
@TeaDrivenDev
TeaDrivenDev / AutoFixture_Intro_de.cs
Last active October 19, 2020 18:36
Warum sehen AutoFixture-Tests so seltsam aus, und welche Vorteile hat das?
/* v1.0.1
*
* TL;DR: AutoFixture rockt.
*
*
* Folgendes ist der Versuch einer Erklärung, warum Unit Tests mit AutoFixture so seltsam aussehen
* und welche Vorteile das hat.
*
*
* Der Code ist so am Stück lauffähig, wenn folgende externen Referenzen eingebunden sind: