Game e-Shop

The system is built in the .NET framework using the MVC pattern with object-oriented C#. Microsoft SQL databases, dependency injection, unit testing, Entity Framework, unobtrusive JavaScript validation and LINQ are some of the technologies that the website was built with. The MVC pattern offers a structured and unified approach to web development with inherent benefits, such as components that are easy to maintain and reuse. Visual Studio 2013 was the tool of choice for this assignment, and using Razor syntax in the views was a necessity.

e-Shop Show Case

Code Sample

Excerpt from CartController: Method for adding products to the shopping cart

public RedirectToRouteResult AddToCart(Cart cart, int productId, string returnUrl, int amountProducts) {
Product product = repository.Products.FirstOrDefault(p => p.ProductID == productId);

if (product != null) {

if (product.SpecialOffer != null){
product.Price = product.SpecialOffer.Price;
cart.AddItem(product, amountProducts);
}else{
cart.AddItem(product, amountProducts);
}
}

return RedirectToAction("Index",new { returnUrl });
}