Logically Speaking

Debug.Assert in C# is your friend

For all those important methods of your application where you would like to / have check an input parameter or output result for null / empty check. In case you don't want those checks while you release and only want them to be break into debug or pause while debugging - Debug.
Jul 18, 2014 1 min read

MySQL error 1449: The user specified as a definer does not exist

I was recently working with a sidekick thing where I was using MySQL as my backend database. This was accessed from the application with hostname - localhost and username dev. I had created one view and was using it in the thing I was working on. It was originally scripted
Jul 12, 2014 2 min read

Preview webcam video and take snapshot in WPF using AForge and MVVM with sample

Shout out: WPF programmer, someday you will be asked to work on a feature where you need to show live preview of a attached USB camera (webcam) and on click of button you need to capture a picture and save or display in some image control. Pretty simple right? Well
Jul 6, 2014 5 min read

Change background color of selected ListBoxItem - ListBox in WPF

Sharing small stuffs I figure out while working with WPF !! Originally when you select any item in a ListBox control in WPF, you will observe that the background color of item turns LightBlue (if not using some kind of theming mechanism). Also when the ListBox control is not in focus
Jul 2, 2014 2 min read

webpages:Version AppSetting in MVC

Another application configuration setting you will observe in web.config of your ASP.NET MVC application is webpages:Version The value for this setting currently is showing 3.0.0.0. This indicates the version of Webpages - Razor view engine is to be used. This application setting was introduced
Jun 25, 2014 1 min read

webpages:Enabled AppSetting in MVC

If you open your web.config at root of your MVC project you will find bunch of default appsetting keys added by MVC or WebAPI. One of the appsetting with key webpapges:Enabled is added which as default value as false. So what is the deal with this appsetting? To
Jun 24, 2014 2 min read

Tale of two web.config in MVC

When creating a MVC project using Visual Studio you will observe that creation process will add two web.config files to your project. 1. In root of the project folder. 2. In the root of the Views folder in the project folder. Question: The web.config in the root of
Jun 23, 2014 1 min read

Base nuget packages for MVC and WebAPI

Started to learn MVC and WebAPI from scratch, have been working with non-web stuffs (mostly protocols and win-service) for a very long time and just want to get my head around with the Modern Microsoft way to do web stuffs using ASP.NET MVC and / or WebAPI. So I decided
Jun 23, 2014 3 min read

Multicasting and delegates in C#

One interesting feature of delegates in C# is that it provide ways to attach / detach more than one methods that has method signature similar to the delegate declared and combine them together. This combining or attaching / detaching of methods to a delegate is called Multicasting. Behind the scenes: This multicasting
Jun 18, 2014 1 min read

How to: Convert datatable to Json object using Automapper and Newtonsoft

I had a weird experience before few days, I definitely knew how to solve the problem and I am sure it is the right way to do it. Thinking it would not be any different to map a datatable to POCO class(es) using Automapper. But it didn't turned out
Jun 18, 2014 4 min read
← Newer Posts Page 5 of 10 Older Posts →
Disclaimer: All code, opinion and information on this blog are my personal view and do not represent or relate my past and / or current employer's view and / or business insides in any way.
Jaspalsinh Chauhan © 2023
Powered by: Terse Theme & DigitalOcean