db tool write in C#