|
Public Module LinqData_Final
Public Function CreateClass_Final(ByVal table As DataTable) As XElement
Dim xslt = <class_1>
<data_1>
namespace WebbertSolutions
{
public class <%= From t In table.TableName Select t %>
{
#region Constants
#endregion
#region Data Members
</data_1>
<data_2>
<%= From r In table.Rows _
Select <data_2a>
private <fieldtype><%= r(1) %></fieldtype><%= " " %><fieldname><%= r(0) %></fieldname>;</data_2a> %>
</data_2>
<data_3>
#endregion
#region Constructor
</data_3>
<data_4>
/// <summary>
/// Constructor
/// </summary>
public <%= From t In table.TableName Select t %>()
{
}
</data_4>
<data_5>
#endregion
#region Properties
</data_5>
<%= From r In table.Rows _
Select <data_6>
<data_6a><fieldtype><%= r(1) %></fieldtype><fieldname><%= r(0) %></fieldname></data_6a>
</data_6> %>
<data_7>
#region Methods - Public
#endregion
#region Methods - Private
#endregion
}
}
</data_7>
</class_1>
Return xslt
End Function
End Module
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Dave is an independent consultant working in a variety of industries utilizing Microsoft .NET technologies.