Getting Started with Git and GitHub

 

 

Read complete article on Falafel Blog

Who is not talking about Git or GitHub? In one of our recent user group meetings, someone asked how many Pull Requests have you done so far in any of open source projects on GitHub. I realized many developers in the room were puzzled with the phrase Pull Request. In this post I will explain some basic Git terminology and explore basic Git commands which will help you get started with Git. In a later post I plan to show you how you can work with Git-based Source Control and Visual Studio 2013.

Let us start with understanding basic terminologies:

Repository

A Repository  is a space where projects reside. Repository can be on a local computer or at an online host like GitHub or Team Foundation Server (TFS). If you are working in project then a Repository is basic unit of working . It will contain all the files, images etc. needed for the project. It should always contains a readme file, which describes the project

Read complete article on Falafel Blog

The call is ambiguous between the following methods in C#

I was writing some Unit Tests on default ASP.NET MVC Movie Application. Application can be created by following tutorials here http://www.asp.net/mvc/tutorials/mvc-5/introduction/getting-started or alternatively you can download sample application as well. Okay so while writing unit test, I had to pass null value for id in Edit action. Compiler was not happy me passing null and I got compile time error as given in below image,

image

Error is clearly saying that there is ambiguous between two methods. On examining Edit action found it was overloaded,

  • Id parameter
  • Instance of Movie parameter

Now when I passed null, complier was not able to decide which overloaded Edit action needed to be called. Because null can be pass for integer id value and for object Movie as well. And that’s the reason complier was throwing compile time error.

How to solve it? Of course you can change definition of Edit action. But we may not want to do it. Other option is to forcefully pass null either as movie or integer id. Null can be passed as integer id as below,

image

Remember this solution not restricted only for MVC and can work in any code written using C#. So, the call is ambiguous between the following methods in C# can be resolved as easily as given discussed above.