Difference between Lazy Loading and Eager Loading

Lazy/Deferred Loading In lazy loading, related objects (child objects) are not loaded automatically with its parent object until they are requested. By default LINQ supports lazy loading. With Lazy Loading, we only retrieve just the amount of data, which we need in a single query. When we need more data related to the initial data,… Read More »

Why we need Multi-threading in our project

Multi-threading is running the multiple threads simultaneously. We can do multiple tasks simultaneously with the help of Multi-threading. For e.g. saving the details of user to a file while at the same time retrieving something from a web service. Threads are much lightweight than process. They don’t get their own resources. They used the resources… Read More »

Static Class in C#

Static Class:- We can create static class or member by using static keyword. Static class or member can be used when object of class or member not change every time. Static class or member are loaded at time of namespace are loaded by CLR. We cannot create instance of static class because static class member… Read More »

Anonymous method in C#

Anonymous is a type that doesn’t have any name. Anonymous type allows you to create new type by using the new keyword and object initializer syntax without defining its class. The var is used to hold the reference of anonymous types. The Type of anonymous is generated by c# compiler that is accessible within the… Read More »

Use of Fault Contract in WCF Service

In WCF Service, errors or exceptions can be passed to the Client (WCF Service Consumer) by using FaultContract. It’s very simple in Asp.Net by adding the Try & Catch blocks. But when you come to the WCF Service, if any unexpected error occurred (like SQL server down/Unavailability of data/Divide By Zero) in service, then error/exception… Read More »

Difference between Finalize and Dispose

A finalizer (aka destructor) is part of garbage collection (GC) – it is indeterminate when (or even if) this happens, as GC mainly happens as a result of memory pressure (i.e. need more space). Finalizers are usually only used for cleaning up unmanaged resources, since managed resources will have their own collection/disposal. Hence IDisposable is… Read More »

What is the difference between HTTP PUT and POST methods

Both PUT and POST can be used for creating. But generally, in practice, we always use PUT for UPDATE and POST for CREATE operations. PUT :-  RFC-2616 clearly mention that PUT method requests for the enclosed entity be stored under the supplied Request-URI. If the Request-URI refers to an already existing resource – an update operation will… Read More »

Async Module–Waterfall and Series in Node.js

Async module in Node.js provide a way to structure and organize our JavaScript Asynchronous callbacks code. In traditional coding practice, we nest multiple callbacks in the same function, that creates lot of confusion in code readability and maintainability. Async Module addresses the afore said problem by providing powerful functions through which we can get different… Read More »

HTTP status codes

HTTP(Hypertext Transfer Protocol) status codes are standard response codes given by Web API’s on the Internet. Here, below the list of status codes: 1×× Informational:- 100 Continue 101 Switching Protocols 102 Processing 2×× Success:- 200 OK 201 Created 202 Accepted 203 Non-authoritative Information 204 No Content 205 Reset Content 206 Partial Content 207 Multi-Status 208… Read More »

Understand Inheritance and Polymorphism with example

In this post, we will understand the Inheritance and Polymorphism concept of OOP’S practically. In most of the interviews, interviewers asked these inheritance questions and trying to confuse you but after reading this post you will easily understand and clear all confusion. When you derive a class from a base class, the derived class will inherit all… Read More »