Difference between expression, ng-bind and ng-model

ng-bind and {{}} are basically the same. However, before your application fully loads, sometimes {{}} are visible. ng-bind usually looks a little nicer before everything finishes loading. ng-bind If you have $scope.textFromComponent = “Superman” in your controller. <span ng-bind=”textFromComponent”></span> binds this value within this span element. {{ }} The same behaviour can be achieved using {{}}. These set of… Read More »

JWT Bearer Token based Authentication in .Net Core

In my previous posts, i have explained bearer token based authentication and authorization which is just a string, potentially arbitrary, that is used for authorization. Now, In this post we will implement JSON Web Token (JWT). It is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between… Read More »

Automapper in ASP.NET Core

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. Read in details. How to use Automapper in ASP.NET Core 1) Add the main AutoMapper Package to your solution via NuGet. PM> Install-Package AutoMapper or   2)  Add… Read More »

Method Chaining in Javascript

Method chaining is a technique that can be used to simplify code in scenarios that involve calling multiple functions on the same object consecutively. This chain is just a single expression. It’s easy enough to break this chain down and make each of the calls into separate expressions, but then it would obviously not be… Read More »

API Versioning in ASP.net Core

ASP.NET API versioning gives you the ability to improve and iterate on API’s without breaking contracts. At times the stagnation of innovation on an API is simply because of legacy decisions that cannot be reversed, especially on public API’s. But versioning can quickly get out of control, especially with custom implementations. The API versioning extensions… Read More »

Difference between Primary, Unique, Candidate and Composite Keys

Primary key: Primary key is a key that is used for uniquely identify the each rows in a table. A primary key cannot be null and cannot be more than one primary key in a table. Where we create a primary key a cluster index is created. But we can change it with non- cluster… Read More »

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 »