Override interface mappings and creata a generic entity version filter

by Tom 20. April 2010 15:02

Introduction

For one of my customers I needed to have some kind of versioning for a whole bunch of entities on my database. Since I use my very own MvcExtensions framework, I wanted to include a functionality which would automatically filter all entities based on this interface :


    public interface IVersionAware
    {
        string Version { get; set; }
    }

In short, I only want to get the entities of the current version through my repository. This interface would then automaticly imply that all data could be filtered by setting a version filter.

I took me quite some time, but spending a weekend at the Dutch coast cleared my mind a bit, and after the weekend I managed to get it working...

The void (tm)

More...

Tags: , , , , , , ,

CodeProject | Development | Howto | News

About me

Tom Janssens op LinkedIn

Tom Janssens op twitter

Core bvba RSS

My name is Tom Janssens and I am the owner of Core bvba, a software and consultancy company.
I am married to Liesbeth and have 2 sons named Quinten and Matisse.
ICT is both my job and passion.
Next to this my other hobby is actively playing music (mostly guitar), and I am also a lousy poker player.

I am also the founder of the following LinkedIn groups:
BDD Professional
Asp.Net MVC professional

More info about me and my company...