Introduction to Dapper.NET ORM in ASP.NET 5

Dapper.NET is an open source, high performance Micro-ORM supporting Sql Server, MySQL, Sqlite, SqlCE, Firebird etc, from Stack Overflow team. Drapper provides extension methods for IDbConnection, so you require an instance of IDbConnection to use Dapper. To use Dapper, you need to include Dapper in the project.json file. In this...


k web command and agile development environment

With the new version of ASP.NET, you can avail the flexibility of deploying your app via an agile app development methodology, where you can modify and save the C# file and refresh the browser, your changes will be updated automatically. You don’t need to go for any explicit compilation in...


How Intercept HTTP calls from WCF client to service

Today I faced some problem, I had to intercept HTTP calls from WCF proxy to WCF service. I was using Fiddler 4. But unfortunely it was not working :( I tried many options.(It was not working for me, but it may work for you) By using system.net proxy setting -...


Converting DataTable to Generic List

Code snippet for converting a DataTable to Generic List. public static List<TEntity> ToList<TEntity>(this DataTable dataTable, Dictionary<string, string> mapping) where TEntity : new() { var list = new List<TEntity>(); foreach (DataRow dataRow in dataTable.Rows) { var entity = new TEntity(); foreach (var keyvaluePair in mapping) { var property = entity.GetType().GetProperty(keyvaluePair.Key, BindingFlags.IgnoreCase...


TagHelpers in ASP.NET 5

TagHelpers is a new feature in ASP.NET, it is similar to HTML helpers, which already available in ASP.NET MVC. Similar to HTML helps TagHelpers allows to process server side content on HTML controls. So <a asp-controller="Home" asp-action="Index">Home</a> Will be rendered as [Home](/Home/Index) It looks similar to ASP.NET controls but it...


Continuous Deployment (GitHub) with Azure Web Sites

Windows Azure websites supports Continuous Deployment. Continuous Deployment can be thought as an extension of continuous integration, where when ever users commit a changeset, build will be triggered. And in case of Continuous Deployment, the changes will be published to your live application directly from source control, when ever user...


Azure-System.MethodAccessException: Attempt by security transparent method

Today I faced a strange issue, after publishing an empty ASP.NET MVC application to Azure WebSite. When I tried to browse the page I got an exception like this - Attempt by security transparent method ‘System.Web.WebPages.Administration.SiteAdmin.RegisterAdminModule()’ to access security critical method ‘System.Web.WebPages.ApplicationPart..ctor(System.Reflection.Assembly, System.String)’ failed. Here is the screenshot This issue...