Few days ago I look for a solution so  I can  just save my time writing CRUD. So I found a solution. It’s called Dapper.

For creating c# class from the database you can use this code

later add Dapper into your project and add Dapper.Contrib

now you don’t need to write a open Datareader and write some reading writing code again and again.

Dapper.Contrib give you some cool functionality like Insert and Update. You still need to write your SQL queries but it’s going to be good and easier to maintain the code. Last year I was working on a c# project and project become full mess of these code. With one line of  SELECT , INSERT  OR UPDATE code and 100 line of code later to just read those things from DataReader.

Dapper can save a lot of your time doing those same repeated thing and do it pretty well.

Happy Coding Smile

If you are adding a view and you see this error, your project is not in the state it can be compiled. If you compile your software it will fail.

For fix the issue , fix the error in Errors List in your current MVC project and then add the view it will work.

Happy coding Smile

From last few years I use select2 for making effective dropdown in bootstrap. In last days I am trying to make it responsive but it doesn’t perform so well.

Here is a nice thread to make it work.

using these tricks you can make it responsive which is quite awesome. Still it’s missing something.

In my implementation I need a feature that I can put it on a small space and I want to use the full width when someone use it.

So I look at The HTML generated by the plugin. I see select2 plugin generate some html div just after the select. If you try to set width or something on select2 after generation or before applying select2 thing will not work well.

The solution is you can write the css code for generated div. for example if you write




it will make the select2 90px. that’s the way we modify the css of generated html, but wait, what about if I click on the select2 and I want to use more width available on the screen. I inspect and go into more detail and found that the plugin generated the div to show that searchbar and list that I see in select2.

the dropdown that you seen on html page have these classes

select2-dropdown select2-dropdown—below

so if you assign it more width  (that you want to see when someone open the select) then you need to make width to these dropdown container div, for example




so in this implementation I have a select2 with 90px width that will used 180px width when someone use it for type something or select.

Here is a quick demo for the post.

Thanks for reading my post.

Happy coding Smile

This article is copied from Visual studio blog, It has been removed from the main place.  I have no attachment with Microsoft. So Words like "I'm" and "We" are not meant for myself. It's means of OP at the Visual studio blog.

We are looking to improve your experience on the Visual Studio Blog. It would be very helpful if you could share your feedback via this short survey that should take less than 2 minutes. Thanks!

I’m happy to announce that the first Preview of Visual Studio 2017 version 15.4 is now available! You can either download it from here, or if you already have Preview installed, you’ll receive a notification that the update is available. This latest Preview contains new tools and features in several key workloads such as Universal Windows Platform (UWP) development, .NET desktop development, and Mobile and Game development. It also continues our drive to improve and polish the fundamentals such as productivity and reliability and address customer-reported bugs. Read the feature highlight summary below, and check out the Visual Studio 2017 version 15.4 Preview Release notes for a detailed description of the new functionality contained in this Preview.

Universal Windows Platform Development – Windows Fall Creators Update

First, Visual Studio 2017 version 15.4 brings first class support for UWP developers targeting the upcoming Windows Fall Creators Update. To start building apps against this new Windows update, first, make sure you are enrolled in the Windows Insider Program. Once you are enrolled, install the latest pre-release version of the Windows Insider Preview SDK.

.NET Standard 2.0 Support

With the release of the Windows Fall Creators Update, you will be able to leverage the power of .NET Standard 2.0 when building UWP applications. .NET Standard 2.0 brings an additional 20,000+ .NET APIs to Windows 10 UWP developers – many of which will be familiar to Windows Desktop (WPF, Windows Forms, etc…) developers. .NET Standard 2.0 also allows for easier sharing of code between various .NET project types as project-to-project references, or as NuGet packages. We are starting to see a variety of NuGet packages show up on with support for .NET Standard 2.0, all of which will be available for consumption inside UWP projects.

To build UWP apps using the new .NET Standard 2.0 APIs, make sure you have the Windows Fall Creators Update Insider SDK Preview installed, and set the minimum version of your project to this version of the SDK.

Windows Application Packaging Project

In Visual Studio 2017 version 15.4 Preview, you will get the first peek at a new project template that enables Classic Windows Desktop apps created with .NET or C++ to be packaged inside an .appx package for easier distribution via side-loading or submission to the Windows Store. These templates work for both new Classic Windows Desktop projects, as well as for existing projects.

XAML Edit & Continue Improvements

You can edit or remove XAML resources using XAML Edit & Continue. In addition, you can also add ControlTemplates to your XAML while using XAML Edit & Continue. To leverage these new features, make sure you are running the Windows Fall Creators Update Preview.

Mobile and Game Development


In Visual Studio 2017 version 15.4 Preview we have made improvements and bugfixes in the tooling for Unity. There is better support for the latest released Unity 2017.1 runtime. This Preview also supports user-defined managed assemblies, a feature coming in Unity 2017.2 that helps to drastically minimize script compilation times of projects. To help with debugging, you can now “Set Instruction Pointer”, which allows you to which moves the execution point and sets the next statement of code to be executed.


The Xamarin Live Player is also included in Visual Studio 2017 version 15.4 Preview. This enables developers to develop, test, and debug mobile apps directly on their iOS and Android devices using only Visual Studio and a device. It’s meant to simplify getting started with mobile development. For instructions on how to try it out, please refer to the Preview Release Notes and, of course, please tell us what you think!

Xamarin Live Player

The Fundamentals

Installer Behavior and Acquisition Experience.

Visual Studio 2017 version 15.4 Preview contains some notable install experience improvements. For example, if you encounter any installation errors, we now provide better assistance in discovering solutions. If some component fails to install and someone else had already reported a similar issue, then the installer error message will link back to the Visual Studio Developer Community and point you to info that should help you diagnose and resolve the problem.

Productivity Improvements

There are a handful of new productivity features that will help you be more efficient and effective as you develop your code. For example, with this Preview, if you’re a C#, VB, or Python developer, you can navigate around your project faster because Ctrl+Click will now Go To Definition. We’ve continued to improve performance and memory usage as compared to earlier releases. Lastly, we’ve refined Live Unit Testing by making it easier to initiate with a start command in the right click context menu as well as in the Team Explorer window. Live Unit Testing is better integrated with MSTest for use in manual mode.

C++ Development

You can now use CMake for Linux C++ development in Visual Studio, which allows you to use CMake based projects that target Windows, Linux, or both. Simply open a folder with your CMake project, select Linux as your target and upon connecting to your Linux machine your sources are synchronized for you. Once the CMake cache generation is complete you’ll have full IntelliSense for your project and targets for building, running and debugging within Visual Studio.

In addition to CMake support for Linux C++ development, with Visual Studio 2017 version 15.4 Preview you can now benefit from CMake version 3.9 and improved support for projects with multiple CMakeLists.

Data Science Tooling

If you’re a Data Scientist using R, we’ve added some great new features to Visual Studio 2017 version 15.4 Preview. Now you can use the full power of Visual Studio to connect to an R session running on a remote computer that is running on Linux or Windows. We support running against on-premise and cloud (Azure) computers as well. In the IDE, we’ve added error squiggles (inline underlines) that will highlight places where you can improve your R code. Finally, we’ve added Live RMarkdown editing, which gives you a live preview of your markdown edits as you type.

Try it out today!

If you’re not familiar with Visual Studio Previews, take a moment to read the Visual Studio 2017 Release Rhythm. Remember that Visual Studio 2017 Previews will install side by side with released bits, so they should not impact your machine. Previews provide an opportunity for you to receive fixes faster and try out upcoming functionality before it becomes mainstream. Similarly, the Previews enable the Visual Studio Engineering team to validate usage, incorporate suggestions, and detect flaws earlier in the development process. We are highly responsive to feedback coming in through the Previews and look forward to hearing from you.

Please Install the Visual Studio 2017 Preview today, exercise your favorite workloads, and tell us what you think. You can report issues or send feedback to us via Report a Problem in the IDE or you can share a suggestion on UserVoice. You can also track your bugs, learn from others, and receive helpful information on the developer community portal.

Hello everyone,

Good evening !

It’s my pleasure to use this blog to write stuff about technical stuff and things that I do or use in my daily life. This blog have a lot of technical issue in past. It’s not work properly.


Many time I click on publish button and it was not working. I see on those days nothing has been published on last many hours  on whole website.


I am moving my blog to for my future post subscribe me on my new address. I am currently focusing on .NET Web & Desktop programming.

I hope We can do in future. If you have any feedback don’t hesitate to tweet to me


Happy coding Smile

In VS 2017, you have choice to install ui components by using bower.  If you work previously in mvc project in visual studio you know all we use is nuget to install anything from jQuery to Newtonsoft.json.


For using bower right click on project and check manage bower package, this option list next to Manage Nuget Package.

Just like that nuget window everything is same. For library stuff you still need Nuget.  


So is there any way like in nuget I can just type and install the package


The good thing with bower is it’s make a bower.json file in your project’s root directory. you can just edit it.  for example I need to install moment.js in my dotnet core project now check how easily it is


open bower.js and start writing moment under dependencies. now when you go after : it will show you all the version. doesn’t it sound cool and much easier ?


You see a version  number started from ~ and one is ^. you want to know what is that thing and how it’s work. please follow this stackoverflow question


Thanks for reading my post, Happy coding Smile

For using method from custom library what you need is adding namespace in views/web.config


for example if you want to use linq methods you need to put something like this


 <add namespace="System.Linq" />


When you open the web.config file you already see some namespace there. After add namespace you can use that method in any of your views.


if this still not work in VS 15 , Close the VS and Restart it. it should work.

If you using using your phone, pc and laptop for a long time on work, you maybe search for a solution to make eye strain easy for you.


For some people flux work fine. I have installed it on my desktop and laptop both. If I can’t get it on new device I can feel what is missing in my system.


I bought Gunnar spectacles from Amazon India. First of all The package come with full of dust but packed well (Amazon packed everything well). I didn’t have any problem with packaging because product was safe in it.


After few days I see small small spot on Gunnar. I report them on FB. They disable rating just after my rating. They have paid for rating as I can see 39 people give them rating. So this company pay for Fb rating that is totally fake.


I mail them but got no reply. FB them but no reply. Tweet them but still not see anything in my inbox.


1. If you closely look at people you will find that all these people talking about it is getting free copy of the gunnar. Gunnar give them free because of marketing.

Marketing too much but no support at all. No one reply when you see a spot in your Gunnar spectacles.


Why there is no comment on FB. Why remove all those comment. Do you see any company doing this with comments. They disable rating option just after my rating. After buying my spectacles they discontinue that list on


Be careful with company like this, Too much money spent on marketing but it doesn’t work good if you see a problem in the spectacles.

Few years ago When I just start work in office I can hardly see smartphone anywhere. The person sit next to me spent 10,000 or 15,000 in 2010 to get a phone (which is not smart as today). that phone have hardly  1.3 MP camera and 3-4 inch screen. Yeah, Maybe that is touch ( I don’t have remembered those days very well) .


Those days are gone. Now Android phone is everywhere and people use phone day to day for many purpose.


So Responsive design is all about focus on Make good experience on Mobile & tablet.


Go with a framework.


Using framework like bootstrap solved a big trouble of responsive.   Bootstrap’s provide solid foundation for making design work in mobile phones and other small devices.


Write our own custom CSS and other code that we can use in every project.


After spent a lot of time on fixing basic thing I finally able to find some basic thing that I need to put on every project (html,CSS, JS) too. Like I do same for MySQL. Same settings to handle Unicode and other thing in every MySQL database.


This will save you a lot of time. Like Most of small work is about margin and padding. Making a class like .mt10 or .pb10 mt stand for Margin top and pb stand for padding bottom.  this basic idea save a lot of time.


All design are same so make it simple and just copy the code and modify.


When you write same thing again and again you will learn many things. For example You can figure out how one of your code is different from other. You can see the same code you write again is better then the one that you write last time.  You are able to copy basic things from this to another one and it will save your time. This thing will not be easy if you don’t have a good practice of what are you doing.


Framework tricks & perfection habit.


Sometime we don’t have a control on project timeline. We need to do thing faster. You can simply complete the design. Sometime we have enough time for finish the work and later if you invest more time in it. Like you spent nights on fixing same thing that you complete in hours. You can learn many good thing which you found never able to learn when you do the work and just complete it.


Focusing on improving things will give you better image of how things can be improved.   Like Prime minister of India do there work better then other and they have proved what is the difference between them and the other. Some people handle things well and other don’t.

If you complete the design and start new it will never gonna better anytime soon. What is need here is spent more and more time on perfecting things.  You can show that someone who use same thing will figure out that this work is better than others.



when you have done enough of the work you can later produce thing faster then ever. Like old C# developer write code faster, same way you can write code better and faster.


Bye !

Happy Coding  Smile