Hello,
I am trying to create a data access layer using t4 and C#. I would like to be able to provide a DAL where I can access any database. The problem I am having is with some of the schema information. I am able to retrieve some information like column and table names but I would also like other information like the name of the primar...
In an application scaffolding project on which I'm working, I'm trying to decide whether to use Oslo, T4 or CodeDom for generating code. Our goals are to keep dependencies to a minimum and drive code generation for a domain driven design from user stories. The first step will be to create the tests from the user stories, but we want the ...
T4 template files are automatically recognizable by the IDE under C# projects, but I have no clue on how they can be integrated into C++ projects (other than using make files).
Any ideas?
...
I use VWD 2008 Express on Windows 7 beta. When I add Subsonic 3 templates to my MVC RC project, Web Developer Express doesn't generate classes based on them. Connection string is correct. Do you have any ideas?
...
I am just getting into the idea of code generation for repetitive coding tasks and have seen both of these approaches. I've seen the XSLT approach in an Apress book Code Generation in Microsoft .Net and have read about the T4 approach in relation to what's new in the MVC framework.
What kind of projects is each method better suited for?...
Wondering if anyone knows of a set of T4 templates for generating C# POCO classes and also mapping XML files for NHibernate from a set of tables in a database. I saw that David Hayden has created T4 for generating FluentNH code based upon a DBML model, but I'm not quite ready to use FluentNH yet as there isn't even an official release ye...
I have heard people state that Code Generators and T4 templates should not be used. The logic behind that is that if you are generating code with a generator then there is a better more efficient way to build the code through generics and templating.
While I slightly agree with this statement above, I have not really found effective wa...
Folks,
I'd like to create some T4 templates for generating class files (about 7 per table) from a database to support our in-house ORM (don't ask - long story and historical reasons.....)
What I'd really love to do is have a property on my main TT template to visually pick server, database and table for which to create the files (somet...
Latest Asp.Net MVC RC permits to return JavaScript ActionResult.
I'd like to dynamically generate from the controller the Jquery script code associated to perform the classical $.ajax calls to the controller for Create Read Update Delete operations in ajax instead of classical get/post form actions.
Should I generate the javascript code ...
I am doing some work with T4 (Text Template Transformation Toolkit) and am trying to get to a point where I can create my own custom text template host. However, all of that relies on the Microsoft.VisualStudio.TextTemplating assembly and I cannot find it on my system!
I first tried adding a reference to the assembly in Visual Studio, b...
I feel like a dork just for asking this, but I'm not getting any help from Google, and I paged through all of SO's results on a simple search for SMO and didn't see it either.
The short version is that I'm starting to play around with T4. I'm expanding on Oleg Sych's initial tutorial to provide enumeration over all tables to create a (I...
Hi there,
i am looking for a T4 Editor for VS 2010 CTP2. Clarius states on their Blog they are waiting for the Beta1.
Any idea other idea where to look?
Thanks
Tim
...
I have created a set of templates that I want to share across multiple projects. Is it possible to add the template to the Project “Add New Item” dialog such that when I choose it an instance of the code file is generated from the template and added to the project?
Update
Thanks for suggestions Preet. That answers the question but I th...
I am using the Microsoft.VisualStudio.TextTemplating.Engine class from the VS 2008 SDK along with the objects from the Microsoft.Practices.RecipeFramework.VisualStudio.Library.Templates namespace to automate the process of creating C# classes from T4 templates.
Here my code. It taken straight from the example on Oleg Sych's Blog...
usi...
I need to create some files using Visual Studio T4 (templating). What is the best way to import some configuration settings into multiple .tt files and have it accessible in the templating code portion.
...
Hi all,
In a project I'm currently working on, we've added a wrapper class for accessing the HttpSessionState object. The trouble is that the current solution means you have to write some code to wrap the functionality. I came up with the following solution
/// <typeparam name="TKey">Class used for generating key into session state sto...
In Visual Web Developer Express 2008 the SubSonic ASP.NET MVC template doesn't seem to work with a new database I added. I removed the Chinook Database and created my own one. I understand the the .tt files in the Models folder are used to generate code, but they don't (despite changing the ConnectionStringName to what I set in the web.c...
I have a library that defines a class
namespace ClassLibrary1
{
public class Class1
{
public static readonly int Rate = 5;
}
}
In the same lib I add a tt file
<#@ template debug="false" hostspecific="false" language="C#" #>
<#@ output extension=".cs" #>
<#@ import namespace="ClassLibrary1" #>
<#@ assembly name="C...
Is it possible to create a Visual Studio item template that generates from a T4 template?
My google-fu does not seem powerful enough to yield an answer!
...
I think I understand the basic principals of T4 but I'm having a hard time figuring out how to apply it to my particular situation.
I have an application that display lists of objects of some kind - doesn't matter what. I want to allow the users to select 1 or more of these objects and submit them to any template. The template could g...