Latest posts

Notes on code and the things I build.

C#

Implementing FluentValidation with ASP.NET Core

Oct 24, 2019

FluentValidation for me is a validation framework that enables readability and cleaner code in our application. There are a predefined set of rules that are already predefined from the framework using Lambda Expression which makes the framework more readable and very neat. For...

dynamics-crm , powerplatform , typescript

PCF: FileUpload to Base64String

Sep 5, 2019

PowerApps Control Framework (PCF) is a framework that helps programmers make custom controls and use them in a Dynamics CRM environment. Even though the framework is still in the preview stage and might be changed in the future, I couldn't help myself to try this. The control...

tips

Extension for Cleaner Code

Aug 5, 2019

The extension method in C#, VB, or F# is a static method that accepts this modifier of TInput. The method can be either void or return value. From the MSDN definition, Extension methods enable you to "add" methods to existing types without creating a new derived type,...

Dependency Injection: SimpleInjector

Jul 18, 2019

Dependency Injection is a pattern that has already been proven to ease of our development. I remember a quote that you sure already heard: "Program to an interface, not an implementation". Why is it important to rely on the interface instead of the implementation class? The...

dynamics-crm , tips

Dynamics CRM 365: WebResource Dependencies

Mar 18, 2019

The common routine that we will do in custom RibbonButton is adding the library that we want to use. Let's say we have a function onCallButton on JavaScript A. But inside the function onCallButton, we have called another JavaScript B. Hence we need to register JavaScript B to be...

dynamics-crm , Javascript , tips

TypeScript in Dynamics CRM CE

Mar 6, 2019

JavaScript sometimes makes me stressed as a developer because of its dynamic nature. You can assign whatever value on the JavaScript object, change it into another type and it will not throw an error. Therefore TypeScript will help you so much because of its strictness. In this...

tips

C# yield return 101!

Nov 29, 2018

One of the basic tasks that usually I do is getting data from the database, changing it into another object, and then processing it.For instance, if you have this data: var details = new[] { new Person {TypeId = 1, Name = "Dafid", Amount = 1000m}, new Person {TypeId = 1, Name =...