Thursday, September 25, 2014

Use ModelState Property within the View of ASP.NET MVC 4 Hi Folks,   Some time you may encounter a situation to verify your Model is valid or not . If you want to access the ModelState property in the View , you can use the ModelState in your Razor View as depicted below in image: Generally this property used to identify that model is valid...

Wednesday, September 24, 2014

Facts about Extension Methods in C# with Practices

Facts about Extension Methods in C# with Practices In this article I am going to demonstrate some facts about Extension Methods in C# keyword of LINQ. This keyword is very helpful when working with extension of existing type like already created classes. Extension methods enable you to add methods to existing types without creating a new derived...

Tuesday, September 23, 2014

Differences between Interfaces and Abstract classes Which we use ?   An abstract class is "which is lack of implementations”. Means it doesn't keep it complete implementations. And if you want to perform some "protocols (some method to be execute)" at application level than we should follow an interface. 1. A class may implement several interfaces...

Sunday, September 21, 2014

Extension Helpers Method in MVC

Extension Helpers Method in MVC There are many ways to create your own helpers using Razor syntax. I am using one of them. The Helper Method is an optimum way to do it.So let's start and create a Helper Method. First we'll start with Extension Method syntax. I have created a sample application and it has HtmlHelpers.cs in the HtmlHelpers folder....

Thursday, September 18, 2014

Faults Vs. Exceptions

Faults Vs. Exceptions The main thing in faults and exceptions is that "faults and exceptions are not the same thing". Exceptions An exception is a .Net mechanism. It is used when the program encounters an error. The .Net language allows us to throw, catch and ignore the exception. At some point they should be handled or the .Net runtime will terminate...

Wednesday, September 10, 2014

Custom Value Providers in ASP.Net MVC This article describes Custom Value Providers in MVC and their uses. Value Providers are the components that feed data to model binders. Feeding the data means installing the data to the Model binder for further use at the action level. The framework contains a few built-in value providers named FormValueProvider,...
Implement Joins in Entity Framewok Using DB Context and LINQ Excerpts from MSDN about LINQ Language-Integrated Query (LINQ) is a set of features introduced in Visual Studio 2008 that extends powerful query capabilities to the language syntax of C# and Visual Basic. LINQ introduces standard, easily-learned patterns for querying and updating data,...