C# realization of pattern Repository