I was working in these templates and wanted to add interfaces.
I found a link in the discussions here, from Jwooley stating he had done this: http://www.thinqlinq.com/Post.aspx/Title/Generating-Interfaces-for-LINQ-to-SQL-Entities
Well he did it, but in Visual basic and I needed C#, so I changed up the script. I tried to add this script to his site, but the submission didnt allow it so I will post it here and add a link to his site.
Hope this saves someone a little time:
(Follow the instructions on the think link site and replace this part :
namespace <#=data.EntityNamespace#>
{
<# }
#><#if (options.CreateInterfaces) { #>
/// <summary>
/// <#=class1.Name#> interface
/// </summary>
<#=code.Format(class1.TypeAttributes)#>interface I<#=class1.Name#>
{
<# foreach(Column column in class1.Columns) {#>
<# if (column.IsReadOnly) {#>ReadOnly <#}#> <#=code.Format(column.Type)#> <#=column.Member#>{ get; set; }
<# }
#>
}
<# }
#>
<# if (data.Serialization && class1.IsSerializable) {
27446a9e-6b6b-4b01-b951-2f11fd9c7bc4|1|5.0
.Net , C#, Programming
linq to sql templates for t4