How to find the connection string of your LocalDB database in Visual Studio

Today while I was developing a .NET Core example for testing Dapper against my LocalDB tables, I had to define the connection string so that I can run queries in my code against the database. If I was to use Entity Framework, then the connection string would be scaffolded for me, but now I have to find it on my own.

Read the complete article

6 tips and tricks for better unit-testing while using the Moq framework

Moq is probably the most known framework for mocking functionality which is then used in your unit-tests. In this article you can find some of my notes about Moq that I wanted to share with you.

Read the complete article

Create a real-life example (Function, Service Bus Queue, Storage Table) of an Azure Logic App. A step to step example.

Some time ago I wrote an article with an example of an Azure Function which I used in my applications. With the current article I want to present you another real-life example of using different Azure Services and combining them together in a Logic App.

A Logic App represents a workflow of steps that are defined to be done in a sequential or in a parallel manner.

Our scenario contains a company which owns an eshop. We are going to build a workflow for getting customer orders, pushing them into a queue for almost-real-time process (A queue is a good way to balance load of large number of requests in your servers), retrieving them back, storing them in a storage table and informing the user about her order with an email. The most important thing, we are going to develop all the steps inside the Azure Portal; the use of Visual Studio is optional.

After we finish with the creation of our Logic App, we are going to have the following workflow:

Read the complete article

3 simple ways to improve your productivity and the code quality when writing JavaScript in Visual Studio 2017

Writing JavaScript code without any type analysis superset like TypeScript or Flow is still a thing and in my opinion absolutely valid and welcome decision. Without types there are some implications while coding in JavaScript. Visual Studio does a great job for providing Intellisense and F12 functionality for the files which reside in the same project. We can improve the quality of our code even more.

Read the complete article

JavaScript IntelliSense in Visual Studio 2015 and 2017 - The current stand, as of 2018

If you are writing vanilla JavaScript in a large web application, it is almost certain that you are dealing with multiple JavaScript files which are scattered in multiple Visual Studio projects, stored in different solutions. Visual Studio does not provide any IntelliSense features for referenced code which sits outside of the current project.

One solution to this problem is to manually search for the specific file and find out which arguments does your function need or which functions are contained in a JavaScript object. Since this can be a tedious action, Visual Studio gives us the option to activate IntelliSense in our JavaScript files by creating a file named _references.js. TypeScript users are already experiencing the benefits of code completion by using the d.ts definition files.

The use of _references.js is not a new feature. It exists for many years now, however, with this article I want to give you the current stand of the feature, as of 2018. I want to find out if the file still does what is supposed in Visual Studio 2015 and 2017.

Read the complete article