Dependency Injection in MVC 1.0(ASP.NET Core)

Please note that below post would be more clear for those who already know what Dependency injection is. As we all know that things has been little changed in .Net core and things has also been changed the way we suppose to register all of our services that we are going to use as DI. … Continue reading Dependency Injection in MVC 1.0(ASP.NET Core)

JSON with camel case in MVC

  Yes, the wait is over. I have heard it manytimes why MVC does not support Camel Case serialization. As workaround people used to use ServiceStack or Json.NET. But as per recent announcement, MVC 1.0.0 now serializes JSON with camel case names by default. How? Before it was something like below: public class Person { public int Id { … Continue reading JSON with camel case in MVC

Moq in Asp .Net core

UPDATE on 15th October 2016: Moq for .Net core is now available on Nuget and you can get it via below command: It means the setting mentioned below are not required now. UPDATE on 20th October 2016: Moq Nuget version 4.6.38-alpha worksfor .Net core- but e.g. 4.5.3 doesn't work, that complains that Moq 4.5.3 supports … Continue reading Moq in Asp .Net core

WebCrawler in C# (.Net)

  I have recently wrote code for WebCrawler in C#. You can find code here at Github. This is basically used to crawl on start and it would stop once it is stopped. Please go through readme section for more details Let me know for more details. Happy coding!

Upload file in MVC 6 (ASP.NET Core 1.0)

There are many ways to upload files in MVC 6. Below code is the simplest way I found till now, If I get any other simpler method then I will update this code. view (cshtml) : <form method="post" asp-action="Upload" asp-controller="Home" enctype="multipart/form-data"> <input type="file" name="file" /> <input type="submit" value="upload"/> </form> controller (cs) : [HttpPost] public IActionResult … Continue reading Upload file in MVC 6 (ASP.NET Core 1.0)

2015 in review

The WordPress.com stats helper monkeys prepared a 2015 annual report for this blog. Here's an excerpt: A New York City subway train holds 1,200 people. This blog was viewed about 7,000 times in 2015. If it were a NYC subway train, it would take about 6 trips to carry that many people. Click here to … Continue reading 2015 in review

Getting a Configuration Value in ASP.NET 5 (vNext) and MVC 6

As you might already know that things has been bit changed for reading appSettings in MVC 6 and Asp.Net 5. We will go step by step how to achieve this. First of all as we were used to add Application settings in Web.config till now. But now onwards we need to add these key value … Continue reading Getting a Configuration Value in ASP.NET 5 (vNext) and MVC 6

Github WebHooks handler using Asp .Net

In previous post we have seen WebHooks handler for Instagram here. In this post we will see WebHooks handler for Github. Github gives very powerful support to the developers. Currnetly there are more than 20 events supported by Github which includes Wildcard Event. What is Wildcard Event? When you add the wildcard event, it will be replaced by any … Continue reading Github WebHooks handler using Asp .Net

WebHooks in Asp.Net : A Visual Studio Extension

Before couple of weeks Asp.Net team has announced to support Web Hooks with Visual Studio. First of all let us see What is WebHooks? A WebHooks in web development is a method of augmenting or altering the behavior of a web page, or web application, with custom callbacks. These callbacks may be maintained, modified, and managed … Continue reading WebHooks in Asp.Net : A Visual Studio Extension

Agile with TFS 2015(Team Foundation Server)

Team foundation Server 2015 is out last month with tremendous new features. First of all let us see basic introduction for those who does not know what is TFS or those who did not work with TFS. Team Foundation Server (commonly abbreviated to TFS) is a Microsoft product which provides source code management (either via … Continue reading Agile with TFS 2015(Team Foundation Server)