Category: .tt
-
.TT – add more informations(.NET version,build ) – part 6 of 7
As you can see from the previous chapter,we have added to the AssemblyDescription more informations – like .NET version,build configuration,and more You can see those with an explorer add-on http://www.codeproject.com/Articles/118909/Windows-7-File-properties-Version-Tab-Shell-Extens Video : http://youtu.be/A_qSdVV93qk Demo project here : https://traceabilitydemo.codeplex.com/releases/view/132231 Source code here : https://traceabilitydemo.codeplex.com/SourceControl/changeset/view/110446
-
Traceability in .NET–.tt files–add changeset – part 5 of 7
We wish to add,from the .tt file,the id of the last TFS checkin. For this purpose we will connect to TFS and we will investigate in the current project the latest change. We will use the facility of .tt file to connect to the host and ask for various features ( such as TFS )…
-
Traceability in .NET–.tt files–add build date– part 4 of 7
Firstly we propose that build can automatically put the data in AssemblyVersion. For this you will need somehow to generate the current date. We can do this in several ways – for example,a post build event. We will use a .tt file that will automatically generate this date. We will use for other things –…
-
.tt files to maintain assembly version in sync
Let’s suppose you have a medium-big application and you have several dll-assemblies-component that the main application references( DAL,BLL). You have several deployments of the application at clients and,when a client,you must find each version of each assembly deployed. I have developed a simple .tt file to ensure that every component that you compile have the…
-
MVC Help View Razor
My passion for .tt files is great . T4MVC is the best example of what you can achieve with .tt files in MVC . Now,the problem: For each project you have a help file must be created. I mostly work with ASP.NET MVC projects – so I frequently have this problem. I have then created…
-
.TT files and property names
This is the second post of http://msprogrammer.serviciipeweb.ro/2012/07/09/tt-files/ Now I will show how .tt files helps you for sorting . In many WebInterfaces you do present to the user an array of items – a list – and the user can sort after various fields. Let’s make an example: You have an EmployeeViewModel class that have…
-
.TT files and logging
This post is a continuation of http://msprogrammer.serviciipeweb.ro/2012/07/09/tt-files/ In this post I will present a simple method to have logging methods that are called – and,if you want,you can log the values of parameters too! Let’s say you have this code in the GUI project and you want to log the SaveNew method – maybe to…
-
.TT files
I want to make a blog series about what you can do with .tt files. I do not mean now what cen be generated from edmx( I have blogged about that at http://msprogrammer.serviciipeweb.ro/2010/09/27/generating-history-trigger-with-ef-edmx-and-tt-files/ and http://msprogrammer.serviciipeweb.ro/2010/06/28/ef-automatic-history-of-table-and-t4-files-tt-files/ ) I will start from a .tt template that will be analyzing a class( the ViewModel in MVC terms )…
-
Generating history trigger with EF,edmx and TT files
I have wrote in an older post ( http://msprogrammer.serviciipeweb.ro/2010/06/28/ef-automatic-history-of-table-and-t4-files-tt-files/ ) how to generate history code for tables . The easy solution was to create a tt file that track for the ObjectContext the SaveChanges for each table that has a “history” in name. the limitation is that,when you raise an sql command such as “update…
-
TT files – generate enum from database
Many times you will program against a table that contains something like an enum,like Status( open=1,close=2,sent=3,approved=4 ) . It is peculiar to wrote those status as text in the other tables – and you do not like also to have update their codes in the C# (VB.NET) code source each time you will add another…