Showing all posts tagged: '.NET'

A 11-post collection

Modern authentication with Azure AD for WinForms (native) apps

WinForms? In 2020? Why, yes I say. Because not everyone is fortunate enough to work on cutting edge technology or frameworks. But this shouldn't stop us, developers, from finding ways to modernize our solutions and adopt best practices. I know what you're gonna say: 'WinForms suck'. And I will agree to an extend. WinForms do come with a lot of bad rep and bad code by design - event handlers anyone? - but it also makes for a great, robust solution that can get you off the ground and with a fully running app in 2 days. Can you do …[read more]


.NETConf 2018 - From developers for developers

.NETConf, the virtual Microsoft conference on all this .NET, cloud and mobile is back for another year and it's only a couple of weeks away! This year, the conference is scheduled to run for 3 days but the last day comes with a twist. We plan on having local developers and MVPs from around the world broadcasting live for 24hrs. This is a totally new format and will even feature some non-English talks! We have an excellent line-up of speakers covering everything .NET from local desktop development to Azure Serverless. The goal of the conference is to showcase new features, …[read more]


Combining data from multiple sources in Azure Search

Azure Search is a great service that allows developers to add search functionality in their applications. I blogged about [how to index and query data from SQL Server using Azure Search](GHOST_URL/indexing-and-searching-sql-server-data-with-azure-search/" target="_blank) before. Today, I want to talk about a more advanced scenario and one that could be more common than you think. By default, every Search index is designed to pull data from one source. The source can be a SQL Database, a blob storage or Azure Table Storage. However, there are valid scenarios where you may want to combined data from multiple …[read more]


Creating .NET fakes using Bogus

I work with many Proof Of Concepts (PoCs) these days and one of the things I find in need frequently is the ability to generate large collections of objects that may resemble what our customers expect. For obvious reasons, I can't grab a copy of a customer's database or access their Azure resources. So I need an efficient, reliable and fast way to generate fake but live-like data that I can use to test my code. Over the years I've used many different tools to do this but lately, I've grown extremely fond of [Bogus](https://github.com/bchavez/Bogus& …[read more]


Application logging to Azure using SeriLog

I'm in the process of creating a cloud-based application that needs to scale well and I'm thinking about error management and logging. There will be a follow up post about the application itself, but for now I want to focus on the logging bit. In my quest to find the right tool, I remembered reading about [Serilog](https://github.com/serilog/serilog" target="_blank) some time ago. I've been meaning to try Serilog but I had to find the right project/opportunity. And now I finally got it! The thing I like about Serilog is that it’s …[read more]


SignalR cross domain with CORS

I've recently had to create a demo for a SignalR project I'm working on. SignalR is awesome when it comes to enabling real-time communications for your application. The amazing thing about SignalR, apart from how easy it is to use, is that it works across many different application types and platforms. You can use it on website, desktop apps and even mobile apps (both native and Xamarin). If you want to know more, have a look at the [official website](http://www.asp.net/signalr/overview" target="_blank) However, as with everything else, sometimes things don't work as …[read more]


Using a dynamic DataReader with ADO.NET

I've recently had to do some data parsing, pulling data from a CSV file, performing some validation and then dumping a series of SQL commands for our data population scripts. I know there are a myriad ways to do this but I wanted to do this as quickly and easy as possible. The process is quite simple: Open the file using a StreamReader Use the awesome [CsvReader](https://github.com/MikeStall/DataTable" target="_blank) Map csv data to object ids from database Output SQL statements and error log To make things fast, I load all the necessary data …[read more]


Generate Guids with PowerShell or ScriptCs

There are many ways to generate GUIDs. You can use one of the many free websites or you can write your own (quick) script to do it. If you want to create your own script, there are 3 easy approaches: PowerShell ScriptCs Uuidgen.exe The first two are very powerful and versatile and can do a lot more than just generating GUIDs. The 3rd one is a dedicated utility for generating GUIDs only. PowerShell PowerShell is first as it's the easiest of the 2. Easiest to get started, that is. PowerShell is already installed on your Windows machine. Just bring …[read more]