Tag Archives: Example

SignalR 2.0 PersistentConnection Example

SignalR 2.0 includes some changes that we need to be aware of before trying to run a SignalR 1.x sample. This example will focus on the Persistent Connection, it’s a classic chat application. First create a new project ASP.NET Web Application … Continue reading

Posted in SignalR | Tagged , , , , , , | 9 Comments

LightSwitch Upper Case in TextBoxes.

How to uppercase text entered into a textbox by a user? Answer: Handle the KeyUp event. Example: Imagine you have a NewClient screen and want to upper the text entered in a property called “Name”. In NewClient.cs Source: Pro Visual … Continue reading

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

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

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