Monthly Archives: May 2013

ELMAH Error Logging in MVC 4

ELMAH (Error Logging Modules and Handlers) is an application-wide error logging facility that is completely pluggable. It can be dynamically added to a running ASP.NET web application, or even all ASP.NET web applications on a machine, without any need for … Continue reading

Posted in CSharp, MVC, Visual Studio 2012 | Tagged , , , , , , , , | Leave a comment

Dependency Injection in MVC 4 using Ninject, Unity and StructureMap (IoCs)

Dependency injection is a software design pattern that allows removing hard-coded dependencies and making it possible to change them. This software design pattern injects the depended-on element (object or value etc) to the destination automatically by knowing the requirement of … Continue reading

Posted in CSharp, MVC, Visual Studio 2012 | Tagged , , , , , , , , , , | 3 Comments

Entity Framework Code First Example in MVC 4.

This example will show you how to create a MVC 4 application using Entity Framework Code First in Visual Studio 2012. 1. Create a new Project MVC 4 Internet template. Name: MVCMovieTraining. 2. In the Models folder add new class. Name: … Continue reading

Posted in CSharp, Entity Framework, MVC, Visual Studio 2012 | Tagged , , , , , , , , | 1 Comment

Repository Pattern

Use a Repository to separate logic that retrieves data from the business logic. It is an abstraction between data access and business logic. The following example is based on the project in the post Entity Framework Code-First example in MVC 4, in … Continue reading

Posted in CSharp, Entity Framework, MVC, Visual Studio 2012 | Tagged , , , , , | 1 Comment

Generic Collections in C#: List, Dictionary, Stack and Queue

The System.Collections.Generic namespace contains interfaces and classes that define generic collections, which allow users to create strongly typed collections that provide better type safety and performance than non-generic strongly typed collections. Dictionary<TKey, TValue> Represents a collection of keys and values. … Continue reading

Posted in CSharp, Generics, Visual Studio 2012 | Tagged , , , , , , , | Leave a comment

Black border AMD Video Card using HDMI

Problem Using an AMD Video Card (AMD HD4850) the monitor doesn’t display full screen when connected via a HDMI cable. This doesn’t happen when connected using VGA or DVI cables. This happens in Windows 7 and Windows 8. Solution. The … Continue reading

Posted in AMD | Tagged , , , , | Leave a comment

Using Twitter Bootstrap with MVC 4 (ASP.NET MVC)

Brief Description: Free open source collection of tools for creating websites and web applications. Open source since August 2011. Contains HTML and CSS based design templates Relatively incomplete support for HTML5 and CSS3 but It’s compatible with all major browsers  … Continue reading

Posted in MVC | Tagged , , , , , , | Leave a comment