Inversion of Control

What is Problem? Let, there is a class called Kids.cs. Purpose of this class is to maintain name and age of kids of a particular person. Kids.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication23 {    public  class Kids     {         private int age;         private string name;    ContinueContinue reading “Inversion of Control”

Singleton Pattern

  The Singleton is a design pattern, which instantiates one instance of the class once it is first called, and maintains that single instance throughout the lifetime of the program. Once it is instantiated, all future requests will be through a single global point of access.   Singleton provides a global, single instance by: MakingContinueContinue reading “Singleton Pattern”

Unity Framework

Objective This tutorial will explain step by step explanation of how to use UNITY Framework in code. UNITY Framework is a framework of Microsoft to achieve Inversion of Control Design Pattern. To know more about, what is Inversion of Control and Dependency Pattern design pattern read my previous article Click here. Two very good articlesContinueContinue reading “Unity Framework”

Lambda Expression

 This article will explain about Lambda expression and its usage. This article will also give differences between Lambda expression and Anonymous method. This article will talk about type inference in Lambda expression. This will also talk about delegate type conversion of lambda expression. We will start with a code. This is a very simple codeContinueContinue reading “Lambda Expression”

Events in c#

 Windows based application are message based. Application is communicating with windows and windows is communicating with application by using predefined messages. .Net wrap up the messages with ‘EVENTS’. And .Net reacting a particular message by handling events. Events are the message sent by an object to indicate the occurrence of an event. Event can alsoContinueContinue reading “Events in c#”

Picture Gallery in ASP.Net MVC Application

 Objective Objective of this aricle is to show, how to work with Images in ASP.Net MVC application. This article will explain, how to display images from Xml file and how to add images in Xml resourece. The Final Output would be something like below. Creating the Resource folder for Image Create an ASP.Net MVC application,ContinueContinue reading “Picture Gallery in ASP.Net MVC Application”

Unity Frame Work in ASP.Net MVC Application

Objective This article will explain step by step that how to inject dependency using UNITY framework in ASP.Net MVC Application Step 1 Create a MVC application Step 2 Add Unity references to the MVC application. Step 3 Idea here is to create a custom controller factory. This custom controller factory will create the controller andContinueContinue reading “Unity Frame Work in ASP.Net MVC Application”

Improving performance with Output Caching in ASP.net MVC application

  Goal: Here, I am going to explain, how we can improve performance of ASP.Net MVC application using output caching. Advantage It enables us to cache the content returned by Controller action. It stops controller action to generate same content each time. We can set caching parameter using output cache. We can specify where toContinueContinue reading “Improving performance with Output Caching in ASP.net MVC application”

Working with Word document in ASP.Net MVC Application

Objective This article will give step by step explanation of How to display a word document in ASP.Net MVC framework. How to customize the default master pages and CSS. First the output, Home will look like below. When user will select link to open a particular word document, output would be Step1 Create an ASP.NetContinueContinue reading “Working with Word document in ASP.Net MVC Application”