Tag Archives: aspnetmvc

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 »

First Application in ASP.NET MVC 5

So we will now create our first application in ASP.NET MVC. Step by step instructions are given below: ->. Open Visual Studio 2013 ->. Click File->New -> Project as follows -> After clicking “New Project” dialog box will appear to user: -> In New Project dialog box 1). First confirm the .Net Framework set to 4.5.1… Read More »