code发生器(.NET) [英] Code generator (.net)

查看:182
本文介绍了code发生器(.NET)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你有 T4 以及任何经验< A HREF =htt​​p://www.t4editor.net/相对=nofollow> T4编辑?你可以把它比作 codeSmith 或的 MyGeneration

Do you have any experience with T4 and T4 Editor? Can you compare it to CodeSmith or MyGeneration?

什么code发电机,你呢?你有什么建议?

What code generators do you use? What do you recommend?

我想用它的SP的generatig。还有什么你觉得code一代有用吗?

I want to use it for generatig of SPs. Is there anything else you find code generation useful?

推荐答案

究竟你想干什么?我想这也取决于从正在试图生成code(模型)。

What exactly you are trying to do? I guess it also depends on from where you are trying to generate the code (the model).

与codesmith和MyGeneration的优点是,它们提供了多种选择,为您生成您的code - 应用,例如,在MyGeneration,你可以写你的模板,在各种LANGS。

The advantage with Codesmith and MyGeneration is, they provide multiple options for you to generate your code - for eg, in MyGeneration, you can write your templates in various langs.

MyGeneration可以提供任何数据库的元模型和大量的内置发电机脚本 - 所以,如果你想生成的SP,最简单的事情将是使用发电机MyGeneration - 你可以找到发电机CRUD的SP正确的有。它还提供了一个相当不错的编辑器,如果你要修改的发电机。

MyGeneration can provide a meta model of any DB and a lot of built in generator scripts - so that if you want to generate SPs, the easiest thing will be to use generators for MyGeneration - you can find generators for CRUD SPs right there. It also provides a reasonably good editor if you want to modify the generators.

如果你正在建设一个DSL或东西(我的意思是,该模型是由一些别的地方来了),那么你可以考虑使用T4。如何过,T4编辑是不是最容易的事情我已经做了,因为没有T4的编辑支持在Visual Studio。你可能会考虑购买Clarius T4编辑器编辑好支持。

If you are building a DSL or something (I mean, the model is coming from some where else), then you might consider using T4. How ever, T4 editing is not the easiest thing I've done, because there is no T4 editing support with in Visual Studio. You might consider purchasing Clarius T4 editor for good editing support.

这篇关于code发生器(.NET)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆