Blog Posts

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

5 Useful DB2 Queries

Here are some DB2 queries that can be very useful. 5 Useful Queries In DB2 Query to identify Stores Procedures using a particular table View the code on Gist. Identify Schema used by Stored Procedures View the code on Gist. Identify Primary Key of a table View the code on Gist. Identify Foreign key of a table View the code on Gist. View used by table View the code on Gist.

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

Horizontal Scaling vs Vertical Scaling

I will try to explain this briefly and hopefully this will help somebody someday. Scaling is the ability of a system or network to grow and handle more amount of work. This work could be any kind of processing from a single user or from multiple users. Why do you want to Scale? A system over the period of time might want to processed request many request from multiple users. Which would be difficult if the system has limited resources

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

Access modifiers and it’s Importance

Access modifiers is one of the important parts of object-oriented programming which is often overlooked. This is used to define and implement some fundamental concepts in object-oriented programming. Access modifiers are keywords used to define the accessibility or scope of type or members. Different programming languages have different access modifiers, but we will look at the access modifiers in c#. What is the importance of Access Modifiers? We need access modifiers to restrict the scope of a type or member,

Continue Reading

Site Footer