C# automatically generate Model tool source code