April 10th, 2016

Visual Studio Code: Setting Environment Variable for Tasks

Visual Studio Code (VSCode) is a lightweight, open-source code editor and available on Linux, Mac OSX, and Windows. One of the key features of Visual Studio Code is its great debugging support for Node.js (JavaScript and TypeScript) and another feature is to run Tasks(Grunt, Gulp, MSBuild…etc.) from the IDE. If you are new to VSCode, I would recommend to see following video which shows how to debug Node.js app, put break-point and use watch window, use environment variable in Visual Studio Code editor:

March 27th, 2016

MongoDB Query: $elemMatch vs. Dot Notation

In MongoDB query, Dot notation is to match by specific fields in an embedded document. When the field holds an array of embedded documents, then to match the field, concatenate the name of the field that contains the array, with a dot (.) and the name of the field in the embedded document.

{ <array field name>.<embedded document field> : <value> }

To specify multiple criteria on an array of embedded documents such that AT LEAST ONE embedded document satisfies all the specified criteria, $elemMatch operator is used.

{ <array field name>: { $elemMatch: { <query1>, <query2>, ... } } }

Let us take an example to understand it. Consider schoolinfo collection includes following documents

March 22nd, 2016

How to display SSRS Report in ASP.NET MVC Application

Today, we will explain how to show SSRS reports in ASP.NET MVC application. Suppose you already created awesome SSRS reports and want to use MVC as Report viewing application. Here is your solution.
Open existing application or create new MVC application. You can install reporting package from NuGet.
Go to Tools -> Library Package Manager -> click on Package Manager Console and type following command into command window.

February 21st, 2016

MongoDB Query: Select and Filter Child Array

If you are using embedded document to model one to many relationships in MongoDB, sometimes you might need to get child data only depends on the report. This post explains some experiments related to select and filter child array with MongoDB queries. Consider a collection school with the following documents:

November 5th, 2015

Export Data to Excel (.xls, .xlsx) in ASP.NET – C#

In this article, we will see different ways to export data to Excel from a web application. It is very common task for web developers. Here are different approaches to do it in ASP.NETC#:

Approach 1:

Using the Excel PIA (primary interop assemblies) to generate a spreadsheet server-side.

It needs Microsoft Office suite installed on your server which is not good. So it is NOT recommended.

Videos

More Videos >

Realtime Voting App With React.js and ASP.NET SignalR

CRUD Operations with AngularJS + Sails.js Rest APIs