C# Implementation of a database index feature