Sitecore Web Forms For Marketers (WFFM) retrieve data using code

Retrieve Web Forms For Marketers (WFFM) data using C# Web Forms For Marketers (WFFM) data will be extracted using following code for Sitecore Ver. 8.2

Sitecore SMTP testing

Many time developer need to do quick test about SMTP is working or not. I think most of the time developer add some code in project and deploy for testing. So for testing instead of compile and deploy; we can test quickly in less efforts. Create .aspx file using any simple editor and put file ...

Convert Enum into list

Convert Enum into list

Flatten an enumerable recursively

/// <summary> /// Flatten an enumerable recursively. /// </summary> /// <remarks>A bit like SelectMany.</remarks> /// <typeparam name="T"></typeparam> /// <param name="enumerable"></param> /// <param name="enumerableSelector"></param> /// <returns>A new sequence of T</returns> public static IEnumerable<T> FlattenDeep<T>(this IEnumerable<T> enumerable, Func<T, IEnumerable<T>> enumerableSelector) { foreach (var element in enumerable) { yield return element; var candidate = enumerableSelector(element); if (candidate == ...

Get results in batch using LINQ

Return results in batch using LINQ, mostly used in rendering public static class LinqExtensions { public static IEnumerable<IEnumerable<TSource>> Batch<TSource>(this IEnumerable<TSource> source, int batchSize) { var batch = new List<TSource>(); foreach (var item in source) { batch.Add(item); if (batch.Count == batchSize) { yield return batch; batch = new List<TSource>(); } } if (batch.Any()) yield return batch; ...