One of the recent requirements I came across recently needed what looks like a Join on a 'Like%'. Let me cite an example to demonstrate the requirement. Consider the Collections below. Master Collection ID Name 1 Jia Anu 2 Sreena Anu 3 Anu Viswan Child Collection ID First Name Age 1 Jia 2 3 Sreena … Continue reading Linq Join on Like%
In this part of Caliburn.Micro tutorials we would explore how to configure and use Gesture Recognition with Caliburn.Micro, particularly exploiting the Short-Hand syntax for Actions. Caliburn.Micro doesn't support this out of the box, so obviously we need to work around the Actions to provide support for Gestures. Let's first formulate the syntax of how we … Continue reading Caliburn.Micro #008: Gesture Recognition using Short-Hand Syntax
One of the recent questions that was intriguing (for me) in Stackoverflow was the need to Process a List and while displaying the result, display only the properties that are decorated with a specific attribute. Let me explain with an example. Consider the following Entity. For a List<Employee>, the expected result would display only "BusinessVertical", … Continue reading Filter List and Display Type members with specified attribute
Automapper comes handy when you have to deal with a lot of DTOs, making it very easy to map one type to another. But there are situations where you might need an extra hand. Consider the following Type definitions. The Source.Address is a XML representation of Address. Your requirement is to configure Automapper to convert … Continue reading Mapping XML Using Automapper
Here are few quick recipes with Newtonsoft.Json Recipe 01 : Convert Json to XML One way to convert a Json to XML would be to convert Json to intermediate class structure and then serialize the class using XMLSerializer. But why go the long way when you can do it directly. Let's check the code straightaway. … Continue reading Json Recipes
There might raise situations in your Project where you might be interested to check if the ViewModel specified has a corresponding View defined and gradefully handle the error, than throwing an exception. Caliburn Micro's ViewLocator class provides you methods that enables you to do exactly that.