private void GenerateEntity(DbTable dbTable, FileStore fileStore) { var template = new Template(this.txtNamespace.Text, dbTable.Name); dbTable.Summary = dbTable.Summary.EndsWith("类别表") ? dbTable.Summary.Replace("类别表", "类别类") : dbTable.Summary.Replace("表", "类"); var entityFileText = template.GetEntityContent(dbTable); fileStore.CreateFile(this.txtOutputDirectory.Text, dbTable.Name + ".cs", entityFileText, Encoding.UTF8); }