Tag Archives: asp.netmvc

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-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 »

Shopping Cart Application Part-04 (Email Settings)

@. The email service also functionally same as Logging and Application settings implementation. @. So add an interface named it IEmailService with following code definition: namespace Shoppingcart.Infrastructure.Email { public interface IEmailService { void SendMail(string from, string to, string subject, string body); } } @. To retrieve the implementation of IEmailService define a class which will… Read More »

Shopping Cart Application Part-03 (Logging)

In my previous article of this series I discussed about create a infrastructure for different configuration settings Now we’ll add logging concerns inside infrastructure project. @. Download Log4Net inside Infrastructue from Nuget with following command: Install-Package log4net @. The logging mechanism works in the exact same way as the application setting functionality. @. Add an… Read More »

Conventions of ASP.NET MVC

->. There are two types of conventions in an MVC project. i). Just suggestions. =>. Suggestions for “how to structure the project”. =>. In ASP.NET MVC some suggestions are –>Put content files (css and image files) to the “/Content”  folder –>Put script files to the “/Script”  folder –>Put model classes to the “/Models”  folder –>Put controller classes… Read More »

Overview of different versions of ASP.Net MVC

ASP.Net MVC 1 Overview: MVC 1.0 was released in March 13, 2009 This release included Code Unit tests  ASP.Net MVC 2 Overview: MVC 2.0 was released in March, 2010. This version included following features: UI helpers with automatic scaffolding with customizable templates Attribute based model validation on both client and server Strongly typed HTML helpers… Read More »

Introduction to Asp.Net MVC

What is Asp.Net MVC? A web development framework on the Microsoft .NET platform provides a way for developers to build well-structured web applications An alternative of Asp.Net Web Forms i.e. don’t need to deal with Aspx page controls, Postbacks, View sates, complicated event life cycles etc. Instead of that developer with deal with defining Models,… Read More »