Read full article on Falafel blog “Decorator pattern attach additional functionalities or responsibilities to an existing object at the runtime”. It adds new behaviour to an individual object without affecting other objects of the same class. New behaviour or functionalities can be either added dynamically at the run time or statically. The decorator pattern: ·ContinueContinue reading “Decorator Pattern in C#”
Author Archives: Dhananjay Kumar
Fetching Image from database in ASP.NET MVC 5 application
In this post we will learn to fetch image from a database. I have taken Northwind database as an example. Employee table of the Notrhwind database stores a Photo using the Image type. We will fetch data from the Photo column (type: Image) in the MVC application. Let us start with the Controller. In theContinueContinue reading “Fetching Image from database in ASP.NET MVC 5 application”
Attribute Routing in ASP.NET MVC 5
ASP.NET MVC 5 introduced Attribute Routing. It allows you to apply a route directly on the controller class. Before we use the Attribute Routing, let’s relook how the convention based routing works. We create a route as follows: Index action of Home controller can be accessed on two different URLs. Either using the base URLContinueContinue reading “Attribute Routing in ASP.NET MVC 5”
Customize the MVC 5 Application Users’ using ASP.Net Identity 2.0
In this post you will learn to customize users’ in ASP.Net MVC 5 app using ASP.Net Identity 2.0
How to use DebugView to Log Entity Framework
In this post I will show you to use DebugView to log the Entity Framework. For detail discussion on the same topic you may want to learn more here: Logging in Entity Framework on Steve Smith Blog Profiling Database Activity in the Entity Framework by Julie Lerman Download DebugView , unzip it and Run itContinueContinue reading “How to use DebugView to Log Entity Framework”
Work with ASP.NET MVC 5 Areas from different projects
Read full article on Falafel blog While working on an ASP.NET MVC 5 application, I came across a requirement to use an Area from one project in another project. For example: I have a project A and a project B. I need to use an Area which is part of project B inside of projectContinueContinue reading “Work with ASP.NET MVC 5 Areas from different projects”
Using AutoMapper : Getting Started
Read full article on Falafel blog I have often seen developers use the LINQ SELECT statement to create a new instance of one class from an existing instance of another class. There are many scenarios when you may have to do this, for example: Creating the domain class instance from the entity class instance CreatingContinueContinue reading “Using AutoMapper : Getting Started”
Walkthrough: Login with Twitter Account in ASP.NET MVC 5 APP using ASP.NET Identity 2.0
Walkthrough: Login with Twitter Account in ASP.NET MVC 5 APP using ASP.NET Identity 2.0
User Instance login flag is not allowed when connecting to a SQL Server instance: Solved
While working with an ASP.NET MVC application I encountered following exceptions: Exception clearly says that user instance login flag is not allowed when connecting to a SQL Server instance. For sure this error is related to SQL Server instance I am working on in this particular application. I examined the connection string in the web.configContinueContinue reading “User Instance login flag is not allowed when connecting to a SQL Server instance: Solved”
Three simple steps to use Kendo UI Web in ASP.NET MVC 5
As we seen in this post that working with Kendo UI Web widgets are as simple as following above three steps:
Add reference of Kendo UI Web
Create the bundles
Add bundles reference in layout page