Month: November 2014
-
An error was raised by libgit Category =Ssh error: solved git for Visual Studio
Have you come across the error as shown in below image? You get the above shown error in Visual Studio while pulling changes from the git server. This error causes because you have local changes without the commit. In this scenario the visual Studio does not give very readable error message. Perhaps you may want […]
-
Property Initializers in C-Sharp 6.0
In the C-Sharp 3.0 a new feature Automatic property got introduced. It allows us to create a class as a bag of the setters and the getters. You can create a class as follows: Each property is backed by a backing filed. When you set value of the property, setter gets executed to set the […]
-
Exception Filters in C-Sharp 6.0
So far we deal with the Exceptions as below. As you see in the following code snippet, we are catching the exception and displaying the error message. Challenge in the above snippet is that you cannot apply filter to the exception. Of course you can have if-else statement inside the try catch block but it […]
-
Child Actions in ASP.NET MVC
Read full post on falafel blog Child Actions are the action methods which can be invoked within the view. This is used to work with the data in the view, which are not related to the main action method. For example, if you want to create a data driven widget in the view using data […]
-
Prototypical inheritance in JavaScript
Read full post on falafel blog Before we can understand prototypical inheritance, let us start with a problem statement. You have a student for whom you need to: Calculate their grade Print the grade In JavaScript this can be simply implemented as follows: There are some inherent problems in the above approach: Variables are defined […]
-
Video : One to one relationship between entities in Entity Framework Code First
Container.cs Product.cs EFContext.cs
-
Check User exists in a Role in ASP.NET Identity 2.0
Read full post on Falafel blog ASP.NET MVC5 uses Identity 2.0 to manage the users and their roles. There may be scenario to check whether the currently logged in user or any user with the id exists in the given role or not, and checking can be done either in the controller class or in […]
-
Start-up code using WebActivator in MVC application
Read full post on Falafel blog WebActivator allows us to execute a code long before application start-up. There may be requirements when you need to load external assemblies or instantiate a particular object before the application start up. You need to make sure some codes execute before the codes inside the App_Start folder and the […]