Auto object mapper to copy property values automatically.

object hierarchy

I was working on a project that required mapping values to complex objects when I say complex the target object was a large collection of multiple objects several levels. Some of the objects to which the values had to be mapped were several levels down. The task of finding the correct objects or directly assigning values to the properties of objects was tedious, especially if it had to be done over and over again. This problem led me to create

Continue Reading

Better way to do API documentation using Swagger

I would like to discuss my perspective and opinion on using swashbuckle versus swagger UI to develop the API documentation. Till a few weeks back swashbuckle was my go-to for creating or generating webapi documentation. Now I prefer the alternative approach. I scoured the internet in search of an alternative approach and all of the solutions was to use swashbuckle. Swashbuckle is a wonderful package to generate documentation. The main and probably the most important disadvantage of using swashbuckle to create the documentation is, the developer

Continue Reading

Reusing same HttpClient, the right way to call different URI’s with same HttpClient object.

Introduction HttpClient in System.Net.Http is the class provided to send a HTTP request and receive a HTTP response from a URI. I did some research on the HttpClient and found that the class has a problem or rather a disadvantage, though the class implements dispose. Using the class without careful consideration could prove to be a mistake later. Please read this blog post for more details on how wrong use of HttpClient can destabilize the application. I’m will discuss the

Continue Reading

Creating a custom header and subheader for Aspx Grid View

This is a quick tip with code snippet on how to create an aspx gridview with a header and subheader. I did this one for my project and wanted to share my solution so that it can be of use to others. A screenshot of the grid is given below. Using the code My solution was to create a new header row in the gridview and add cells to the row and change the column span property of the table header cell as required. This manipulation is

Continue Reading

Asp Grid View with custom column for Text box and Button control for update and display


Introduction We use Asp grid view to display various information and we may have come across multiple scenarios where we want to create a grid with text boxes and button in the grid view for each column. To achieve this asp data grid gives us this option with edit item template where we can create a text boxes and also add Edit, Update and Cancel button, but there are a few downside to using edit item template like creating custom

Continue Reading

Log4net rolling file log based on date and file size

Logging is an important part of any application and a developer spends a good amount of time writing code to log. Logging is important as this helps us create a trace of all the events in the application and in turn helps in debugging, identifying and analyzing issues and bugs. Log4net is an open source framework for logging the output in an application. The application framework is released under Apache License, Version 2.0. Log4net provides multiple types of logging techniques.

Continue Reading

Site Footer