How to connect a web application to PowerBI to give users a unique experience across a website using the PowerBI APIs
Category: .NET General
Test our code with json
Test Driven Development (TDD) helps you to validate your code but something you need to check some result from a json file. Here my solution
Adding Swagger to Web API project
Adding Swagger to your Web API project does not replace ASP.NET Web API help pages. Or maybe yes? Here how to implement Swagger in your apps
The Last Slice: challenge
Beat challenge 1 (download the game, change the code) here. Then beat challenge 2. First five to beat challenge 3 win $10,000 USD each. No joke. Challenge 1 This is…
Happy 15th Birthday .NET!
Today marks the 15th anniversary since .NET debuted to the world. On February 13th, 2002, the first version of .NET was released as part of Visual Studio.NET. It seems just…
It’s a Good Day to Be a C# Developer
Recently at Connect(), Microsoft made a slew of new announcements. First, the public availability of Visual Studio 2017 Release Candidate. This just isn’t a new version of the signature developer…
Dijkstra's Algorithm in C# with Generics
I recently needed to to implement a shortest-path algorithm (to identify preferred domain controllers using site link costs) and I found Dijkstra’s Algorithm Path class using System; using System.Collections.Generic; using…
DistinctBy in Linq (Find Distinct object by Property)
public class Size { public string Name { get; set; } public int Height { get; set; } public int Width { get; set; } } Consider that we have…
Data and data access technologies
In my previous post I spoke about key layers of distributed applications. Now we will go through the most crucial layer of any distributed application, the data layer. In this…
Key layers of distributed applications
Every application that is going to be used by end users should be designed appropriately as users are expecting to process information from various data sources that might be geographically…
Remove line numbers from code
Often you copy from a site some code but it has line numbers and you have to spend some times to remove them. With my simple tool on line, you…
Throw vs Throw e
Some people asked me the different between those two following code: Code 1 try { ... } catch (Exception ex) { throw ex; } Code 2 try { ... }…
C# Faster way to truncate a string
Very often I found this problem and now I got a solution! I’ve compared some methods and I was decided which one. But I verified time (if you want to…
Calculate the execution time of a method
I found a simple code to know the execution time of a method. First of all you have to import the following namespace: using System.Diagnostics; Then you use Stopwatch to…
Implementing the Inversion of Control Pattern in C#
In my previous post I spoke about the first principle of SOLID. In this post I explain last two principle. I hope it will be clear enough. Dependency Inversion Principle…
Design, Source and Split tabs are missing in Visual Studio 2015?
If the HTML file is in Solution Explorer, then right-click and select “Open With”. Otherwise open it with Open File dialog, but click the small dropdown arrow in the Open…
Visual Studio 2015: upgrade all NuGet packages at one time
Open the Package Manager Console and use the Update-Package cmd-let to update all packages. If this doesn’t work, you have other two solution. Always in Package Manager Console you type…
Universal Windows app samples
On GitHub Microsoft have published a lot of examples for Universal Apps: the link is https://github.com/Microsoft/Windows-universal-samples This repo contains the samples that demonstrate the API usage patterns for the Universal…
Windows 10: Changing Paradigms
Windows 10 is the main discussion topic in the online development communities. This new operating system that is currently in the technical preview (and available through the Microsoft insider program)…
Download ReportViewer 2010, ReportViewer 11 and SQLSysClrTypes
Have you tried to install ReportViewer on a server? If you as me receive a similar error, I have a solution. When you have to install the Report Viewer on…
Encrypting QueryStrings with .NET
Once upon a time in the tech world, obscurity was security – this being most true in the early years of the industry, when there were gaping holes in privacy…
Log record changes in SQL server in an audit table
How to implement a log record changes in SQL server in an audit table and Entity Framework. This is the easy explanation and the code