February 3rd, 2015

Realtime Voting App with ASP.NET SignalR, React.js and D3.js

This tutorial shows how to build a survey or voting app that displays poll results in real-time using ASP.NET SignalR, React.js and D3.js.

ASP.NET SignalR: to build the real time voting app, then broadcast the live result as votes come in.
D3.js: For data visualization. (Creating Pie chart to show the result)
React.js: To update UI in a very efficient manner for real time changes.

If you are new to React.js, I strongly recommend to read following tutorial:
React.js: Introduction and Hello World with ASP.NET MVC 5 Read More Realtime Voting App with ASP.NET SignalR, React.js and D3.js

November 30th, 2014

N-Layered App with Entity Framework, Autofac, ASP.NET MVC and Unit Testing

In my recent post, I explained how to implement a decoupled, unit-testable, N tier architecture based on Generic Repository Pattern with Entity Framework, IoC Container and Dependency Injection in ASP.NET MVC, then I got feedback against the repository/Unit of Work pattern. On googling, I found some more posts:

Say No to the Repository Pattern in your DAL
Repositories On Top UnitOfWork Are Not a Good Idea
Why Entity Framework renders the Repository pattern obsolete?

Entity Framework already implements a repository pattern. Implementing another layer on top of this is not only redundant, but makes maintenance harder. You might want to mock your Entity Framework context rather than using the repository pattern. This post explains how you can implement N Layered app without repository/unit of work pattern on top of EF.
Read More N-Layered App with Entity Framework, Autofac, ASP.NET MVC and Unit Testing

August 21st, 2014

Generic Repository and Unit of Work Pattern, Entity Framework, Unit Testing, Autofac IoC Container and ASP.NET MVC [Part 4]

This is the summary post of the series. I would recommend you to read following posts first:

1. Implementing Generic Repository and Unit of Work Pattern With Entity Framework

2. Dependency Injection in ASP.NET MVC using Autofac and CRUD operations

3. Creating Unit Tests for the Controllers, the Service Layer and the Repository Layer Using Mock Framework
Read More Generic Repository and Unit of Work Pattern, Entity Framework, Unit Testing, Autofac IoC Container and ASP.NET MVC [Part 4]

July 24th, 2014

Generic Repository and Unit of Work Pattern, Entity Framework, Unit Testing, Autofac IoC Container and ASP.NET MVC [Part 3]

In my last two posts, We have done following things:

Implementing Generic Repository and Unit of Work Pattern With Entity Framework
Dependency Injection in ASP.NET MVC using Autofac and CRUD operations

In this post, we are going to start writing our unit test.
Read More Generic Repository and Unit of Work Pattern, Entity Framework, Unit Testing, Autofac IoC Container and ASP.NET MVC [Part 3]

July 24th, 2014

Generic Repository and Unit of Work Pattern, Entity Framework, Unit Testing, Autofac IoC Container and ASP.NET MVC [Part 2]

In my previous post, I created models, repository and service layer. Now we will implement CRUD operations using these layers and setup Autofac IoC Container.

I would recommend you to read previous post first if you have not read.
Read More Generic Repository and Unit of Work Pattern, Entity Framework, Unit Testing, Autofac IoC Container and ASP.NET MVC [Part 2]

July 23rd, 2014

Generic Repository and Unit of Work Pattern, Entity Framework, Unit Testing, Autofac IoC Container and ASP.NET MVC [Part 1]

In this post, we will see how to implement a decoupled, unit-testable, N tier architecture based on Generic Repository Pattern with Entity Framework, IoC Container and Dependency Injection in ASP.NET MVC. We will implement a sample application step by step for the same.
Read More Generic Repository and Unit of Work Pattern, Entity Framework, Unit Testing, Autofac IoC Container and ASP.NET MVC [Part 1]