United Way Silent Auction

Page

Introduction

At my current position I was tasked to create a system for our yearly United Way fund raiser.  This is a silent auction that we do each year and it lasts 3 weeks so this was a quick development project but could be a good example for others to look at to learn a few tricks to MVC development. The application allows for the creation of any number of auction items, setting a base auction price, setting a minimum bid increment, and adding a picture and description for the item.  Our auction is done in a basket format so each basket contains multiple items, and lists are used to describe the basket items. This setup could easily be modified to fit your individual needs, but some work could use to be done separating the layers if it were to be used for a widely deployed project.

The project was created in ASP.net 4.5 and Microsoft MVC 5.0 with Entity Framework. I used a data first approach in order to quickly create the site.  This lends to a quicker timeline for development, and testing can be implemented by creating a test fixture for feeding data to the controllers.  This was a .  Take a look and let me know what you think in a comment or an email.

Setup

Create the Database

The first thing that I did was to create a database that fit the model that I had agreed on when creating a specification for the project with the other stakeholders of the project.  Here is a quick look at the data model to easily recreate the database in an SQL environment:

Data Model.jpg

This can be created locally on your development machine first in order to facilitate easy development and then switched to the live server once testing of the logic is complete. This can be done by

Create new MVC 5 Project in Visual Studio

For this project I used the MVC project template rather than a blank template since I didn’t have intentions of doing anything beyond the scope of the initial template.  For a project that would be deployed on the internet, or had a longer lifespan I would recommend creating separate projects for the Data Access, Controllers, and Presentation layers of the project.  This also gives you a better setup for writing test fixtures in order to thoroughly test your layers before deploying them to a live environment.  Check out my other projects on this blog to see some more involved approaches.

For something that needs to be developed quickly, and can be deployed with minimal testing, or for people who are still learning the MVC pattern, the template is a good place to start because it already comes with most of the structure that we will need to get the project afloat.

I used Visual Studio 2013 to create this project, but I have since moved to 2015, so any screen shots that I add will be from 2015.  In 2105 create a new C# web project and name it with an appropriate name.

NewProjectDialog