New Project: XContext

Find out how I decided to cut down my SQL Azure costs on Microsoft Azure.

Author Avatar

Author: Tom McClean

Updated: 13 Oct 2017 17:52

If you are familiar with hosting websites, you will know that SQL Azure can get quite expensive, every individual database is billed seperately. While you can host additional websites at no extra cost using the Azure Web App Service, each website tends to need a database which costs more money every time.

I wanted to cut down my Microsoft Azure costs, I found the easiest way to do this was to stop using SQL Azure in cases where I was only using the database for small tasks, such as configuration storage and logging. So I decided to write a new package that allows you to pass List<Object> and have it automatically store the data inside the list as a file on the File System.

My new package is called XContext, it allows you to read and write xml files, when writing it serialises your data into XML and when you read it deserialises it back into the native type. The package also employs a way of reducing the amount of IO needed by keeping in memory changes you make and writing them out periodically.

This project was also a good opportunity to learn a bit more about generic types and writing functions that use Lambda for quering. Check it out on my GitHub page if you are interested in learning more!

I intend to work on this project every now and again, the main feature I will be adding in future is the ability to store the data files on the Azure Blob Storage service which is a very economical and reliable way to store data on Microsoft Azure, it also helps when using the package on load balanced websites.



You need to Login or Register to comment.


Introducing LogBook

I recently wanted to add some basic logging into an MVC Web Project, but all of the big offerings like Elmah and Log4Net are too bloated, so I decided to write a minimalistic logging tool of my own.

Tips and Tricks

Implementing Effort into a C# MVC Website to allow Unit Testing

I recently wanted to have the ability to write Unit Tests for a personal project, I picked Effort.EF6 to help. This post goes through the setup for "Effort" and why you should choose it.

Portal CMS

Portal CMS Demo Website Now Available

I wanted to make it as easy as possible to try out Portal CMS. So I have setup a demo website you can login to and try it out!

Portal CMS

User Experience Improvements to the Portal CMS Page Builder

We recently made some changes to the Page Builder in Portal CMS to make it easier and quicker to use. Learn more about what has changed inside this post.


Summer Holiday in Thassos, Greece

I just returned from a holiday in Thassos in Greece, so I wanted to post up some photo's to show what I got up too!


What is SendGrid?

As somebody who develops quite a lot of websites, I find that most of the time I tend to use a lot of the same technologies and services. A lesser known service which I have come to love is called SendGrid, heres why I love it.

Portal CMS

Inline Editing in Portal CMS

I recently releasd a huge change to the Portal CMS technology I have been working on. The ability to change content just like you do offline in Microsoft Office. No need to save changed, nor wait for changes to be made.

Tips and Tricks

How to setup a Web App on Microsoft Azure

A how to guide to creating a Web App on Microsoft Azure, deploying it using Continuous Deployment and hooking it up to a database.

Portal CMS

Portal CMS - Promotional Website

I decided to make a standalone website for Portal CMS; the technology I wrote to sit behind this website and many others. Why not take a look and see what its about?


Website Relaunch

Welcome to my personal website. I am just in the process of relaunching it under my new technology called Portal CMS.

Tips and Tricks

Cost Effective Email Hosting for Custom Domains (Migrated)

This article takes a look at options for setting up multiple email accounts for multiple custom domains.

Portal CMS

Portal CMS - Page Builder Demo

Portal CMS is my latest technology, this article shows a video demonstration of the new technology in action.


Windows 10 - Initial Reaction (Migrated)

This article covers my initial reaction to Windows 10 after using it on my main computer for a few days.


Windows 10 - Coming soon (Migrated)

A brief look at the upcoming Windows 10 release and a look at the new features in the update.