Category Archives: 1.10-Asp.net MVC

SignalR in a Nutshell

Introduction In this article I will discuss about the basic introduction of SignalR. What is SignalR? SignalR is a set of libraries build on .NET Framework and Jquery. These libraries can be used from both client(s) and server. SignalR facilities real time, bi-directional communication between clients and server by establishing persistent connection between them. What… Read More »

MVC Routing

What is Routing? Routing simplifies MVC url. Routing helps us to create user friendly url and those urls can easily maps with technical controller names and action names. How to simplify the url? Some developers maintains some coding standard i.e. naming standard like using prefix word Cls before class name e.g. ClsHomeController. Also some developers… Read More »

First Application in ASP.NET MVC

Open visual studio so following like window will open: From above window click on File Menu -> New -> Project as follows: So a dialog box will appear to us. From this dialog click “Web” menu so it will show “ASP.NET Web Application” template as follows: Inside above “Web” menu there is also a submenu… Read More »

Shopping Cart Application Part-11 (ViewModels)

Before we ditails discuss about ViewModels we’ll discuss about the role of Service layer in our application. @. In our project the service layer will coordinate the retrieval and persistence of business entities. @. A service receives requests from the controllers for updates to the domain model as well as a specific view of the… Read More »

Shopping Cart Application Part-09 (Repository classes)

@. Now we’ll create base repository class that will implement IRepository interface (that we defined inside Shoppingcart.Infrastructure layer). @. Let’s add a class and named it Repository with following definition: public abstract class Repository : IRepository where T : BaseEntity, IAggregateRoot { private ShoppingcartContext dataContext; private readonly DbSet dbset; protected Repository(IDataContextFactory dataContextFactory) { DataContextFactory =… Read More »

Shopping Cart Application Part-07 (Repository contracts)

@In my previous post I discussed about Product Catalog. @. Now I will create Repository interfaces. @. These interfaces actually act like contracts with their implementations. @. They will also specify what will must implement by a concrete class (that implements the interface) @. In our Product catalog we defined three entities as Aggregate Root… Read More »

Shopping Cart Application Part-06 (Defining Product Catalog)

@.We already completed our Infrastructure settings @. The most vital part of a Shopping Cart application is Product. @. Now we’ll work with Product catalog part of our application. @. This part of the domain is fairly anemic with little business logic. @. This part contains following classes @@. ProductTilte : Represents the name of… Read More »