Click here to Skip to main content
15,867,453 members
Articles / Web Development / ASP.NET
Tip/Trick

Demonstration Application using MVC SignalR and Entity Framework: Part I

Rate me:
Please Sign up or sign in to vote.
4.27/5 (5 votes)
28 Jun 2015CPOL2 min read 18.2K   11   4
Demonstration application using MVC SignalR and Entity framework - Part I

Introduction

Easy solution 2015 is the demonstration application built up mainly using Microsoft technologies.

Background

Everything is built in MVC architecture making it light with pure HTML 5 and razor engine. Inclusion of bootstrap makes the application responsive which is compatible with numerous devices.

Entity framework, as the application has more emphasis in the front end, EF makes data connectivity easy.

Coming up with signalR, the latest and fastest Microsoft technology to transfer data without postbacks using hub connection. This is my first project with all innovation experimentation and I hope it would turn out as a great success!!

The process flow of the application is broken into three steps:

Step 1

This involves the authentication part with Facebook and Twitter and works with MVC 5. This is done with the mapping of developers community with the application login access. In EasySolution, to purchase items from the page, the user must be authenticated. This would be secure, easy and universal login system.

Note: No personal information other than email ID and username is fetched in easy solution.

For Part 2, visit the following link:

The Flow Of Login System

Image 1

Step 2

After successful authentication, the products that are to be purchased will be visible in products view page. This step mainly involves the purchase and payment process. When the item is selected from the list to purchase, it would be added in the cart, further proceeding to payment page, before paying for the product, it would check for availability of the product from the database, if it is available, the payment is received by the server or else it would redirect back with message "no stock". After successful payment is received, product request is registered in database and user is redirected to products' page to re-confirm the purchase. If the user doesn't confirm the purchase, the amount will be returned back to the user within 24 hrs from the time of amount paid.

Image 2

Step 3

Here comes the most interesting part of the application. After successful payment, the user gets one more chance to confirm the purchase. If the user confirms the purchase, the signalR functionality comes into role for updating the product count which is purchased and quantity decrements by 1 on each client which are connected to purchase this particular item. As the confirmation of the product is received, the product View sends the signal to connected Hub and without POSTBACK all clients connected to the same Hub will be updated with the new count of quantity. This makes the purchase system dynamic, as a client purchases the product the other clients will be notified without reloading the entire page or clicking any refresh button.This is how signalR would help the application perform faster, with reliable transaction system without hitting the server side code, using JQuery to transfer data.

Image 3

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
Suggestion[My vote of 2] Code and Documentation Pin
stixoffire10-Sep-15 10:54
stixoffire10-Sep-15 10:54 
SuggestionOne suggestion Pin
Tridip Bhattacharjee29-Jun-15 21:23
professionalTridip Bhattacharjee29-Jun-15 21:23 
GeneralRe: One suggestion Pin
Shashank S Chandel30-Jun-15 8:02
Shashank S Chandel30-Jun-15 8:02 
Thank you Mr Tridip . Code will be placed soon Smile | :)
GeneralRe: One suggestion Pin
Shashank S Chandel5-Jul-15 3:53
Shashank S Chandel5-Jul-15 3:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.