Showing all posts tagged: '.NET'

A 9-post collection

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 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 sources in the same search index. There …[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 by Brian Chavez. I find …[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 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 extremely easy to set up especially with its fluent …[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 However, as with everything else, sometimes things don't work as you would expect them. SignalR is incredibly easy to setup …[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 Map csv data to object ids from database Output SQL statements and error log To make things fast, I load all the necessary data collections from the database at the beginning of the …[read more]