Connected and Disconnected architecture in ADO.Net

The ADO.NET Framework supports two models of Data Access Architecture, Connection Oriented Data Access Architecture and Disconnected Data Access Architecture. Connected Architecture of ADO.NET In connected architecture, the connection must be opened to access the data retrieved from the database. It was built on the classes connection, command, datareader and transaction. Disconnected Architecture in ADO.NET… Read More »

AutoMapper in C#

AutoMapper is an object-object mapper which allows you to solve the problem of manually mapping each property of a class with the same properties of another class. AutoMapper saves you the tedious effort of having to manually map one or more properties of such incompatible types. Before AutoMapper was introduced if we wanted to assign… Read More »

Calculate age in years, months and days in mysql

When we are dealing with dates in mysql sometimes we need to calculate the age in years months and days directly from the mysql query We can easily achieve it from the below sql query SELECT name,dob, CONCAT(TIMESTAMPDIFF( YEAR, dob, now() ),’ Years,’, TIMESTAMPDIFF( MONTH, dob, now() ) % 12,’ Months,’, FLOOR( TIMESTAMPDIFF( DAY, dob,… Read More »

Global Exception Handling in ASP.NET Core WEB API

In my previous post, i have used multiple ways (Exception filter, Global.asax, OnException at Controller etc.,) to implement exception handling in Asp.Net MVC. Asp.Net Core comes with many in-built and ready to use middleware, and you can add them to your application in the Startup class Configure method. One of the in-bulit ASP.NET Core diagnostic… Read More »

Explicitly implementation of Interface

In this post, We will learn how to implement multiple interfaces with same method name with example. When a class which has inherited an interface explicitly implements methods of that class is called explicit implementation.This method can now be accessed only through interface instance.They are useful in cases when a class inherits two interfaces and both… Read More »

Error: Unable to connect to the Database. A network-related or instance-specific error occurred while establishing a connection to SQL Server.

Error: Unable to connect to the Database. Description: While trying or establishing a database connection and the connectivity to the database is not configured properly then this error occurs. More exception details as followed. Exception Message: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or… Read More »

Difference between Local & Global Temporary Tables

In this post, we will learn what is temporary tables, types of temporary tables and difference between local & global temporary tables. Temporary Tables are a great feature that lets you store and process intermediate results by using the same selection, update, and join capabilities that you can use with typical SQL Server tables. The… Read More »

What’s new in Angular 4

AngularJS is one of the most popular JavaScript frameworks to create dynamic Web apps. It is maintained by Google. In this article, I will explain what the new changes that come with Angular 4.0 are. Why not Angular 3? Due to misalignment of router package version . As @angular/router was using v3.3 already , so… Read More »

Accordion in AngularJS

Accordions are useful when you want to toggle between hiding and showing large amount of content as below image: Follow the below steps to show accordion in page using angularjs as above image. Step 1:  First create a module which define the angular application and add controller with some dummy data to show in accordion… Read More »