tangible T4 Editor Blog

News, Tip and Tricks from the tangible T4 Editor team.

Walking the Visual Studio Code Model with T4 Template (Design-Time Reflection)


It is common to use Reflection to explore namespaces, types and classes when running in a .NET application. But T4 Templates generate output code during Design Time. So there are no compiled assemblies yet that could be reflected or that ones available are from the last build and outdated.

In order to get information on what classes will be available in your assembly to be used inside a T4 Template, you need to access the Visual Studio CodeModel of the current project that is available at Design Time.


Access the Code Model

Using the Visual Studio Code Model you can access the following artifacts of your code at Design Time:
Types, Namespaces, Structures, Interfaces, Classes, Enumerations, Variables, Delegates, Properties and Functions. These Artifacts can be accessed via the CodeModel-Property of a EnvDTE.Project class or the Property “FileCodeModel” of a EnvDTE.ProjectItem.

Blog Series: Model Driven Development with T4 templates – Part 5


This is the last part of the blog series about some of tangible engineering’s contributions to a Model Driven Development process in software development. In this part we are going to create a basic generic user interface that allows users to explore and manipulate data from any domain specific model created as a Persistent Object Model.


Blog Series: Model Driven Development with T4 templates – Part 4


This part of the Model Driven Development blog series creates persistence layer (based on SQL Server) for the domain specific model built in Part 2 of the series using the C# code classes for Entity Framework 5.0 generated by a T4 template in Part 3.

The next blog post will create a basic user interface for interacting with the data objects and storing them in a SQL Server relational database.



Blog Series Overview

Part 1: Model Driven Development and Series Overview

Blog Series: Model Driven Development with T4 templates – Part 3

Part three of this blog series creates data objects based on the domain specific model we build in the previous part. Instead of writing all class code by hand we’re going to implement a reusable T4 template that transforms the model diagram into C# data classes for EntityFramework CodeFirst.

Following to this blog post we’re going to create data persistence layer based on this data classes and a basic user interface using another T4 template.




Blog Series: Model Driven Development with T4 templates – Part 2

The second part of this blog series introduces the tangible Modeling Tools, a Visual Studio integrated designer for several UML-style diagram types, that can be used to create domain specific models. Later in this series we’re going to use a Persistence Model diagram (.tasl) to generate data classes and a basic UI from it using T4 templates.



Twitter Updates

Authorization on the site

For an authorized user opens up new possibilities