Upgrade Your .NET Console App Experience

The lowly console application has gotten a sad reputation in the .NET ecosystem. Generally, the project format is relegated to the arena of the demonstration. We’re all guilty of starting and abandoning that ConsoleApp341 project. It is time the console app gets the respect it deserves. Source: khalidabuhakmeh.com/upgraded-dotnet-console-experience

Linq To CSV

LinqToCSV Class namespace FooFoo { public static class LinqToCSV { public static string ToCsv<T>(this IEnumerable<T> items) where T : class { var csvBuilder = new StringBuilder(); var properties = typeof(T).GetProperties(); foreach (T item in items) { string line = string.Join(“,”,properties.Select(p => p.GetValue(item, null).ToCsvValue()).ToArray()); csvBuilder.AppendLine(line); } return csvBuilder.ToString(); } private static string ToCsvValue<T>(this T item) { if(item == null) […]

Fix of “The breakpoint will not currently be hit. No symbols have been loaded for this document.”

Start debugging, as soon as you’ve arrived at a breakpoint or used Debug &gt; Break All, use Debug &gt; Windows &gt; Modules. You’ll see a list of all the assemblies that are loaded into the process. Locate the one you want to get debug info for. Right-click it and select Symbol Load Information. You’ll get a dialog that lists all […]

How To Get An In Depth Insight Of Your Code With NDepend static analysis tool

As a software developer, you may have come across a situation where you need to measure the quality the source code you have at hand. How well is the code written ? is it easily maintainable ? and similar important questions. Obviously, you don’t want to go through each line of code in the whole project to determine […]

Deploy dotnet Core MVC on Ubuntu with Supervisor

Introduction I Just purchased a Linux VPS and started to install dotnet core on it and use it for deploying dotnet core apps Removing Apache Most of Linux vps comes with apache so first step is to remove it. sudo service apache2 stop sudo apt-get purge apache2 sudo apt-get autoremove Finally, check if there is any configuration files […]

The Mediator Pattern In .NET Core

A couple of years back, I had to help out on a project that was built entirely using the “Mediator Pattern”. Or more specifically, built entirely using the MediatR library. There were all these presentations about the “theory” behind the Mediator Pattern and how it was a real new way of thinking. I couldn’t help but think… We’ve been doing […]

1 2 3 8