Retrieving data table structure from XSD schema is faster than creating by code in .net?
-
I am working on maintenance of asp.net web application. In this application developer have used a lot of datatable's to transport data between database and UI. For creating datatables developer have used compile time approach mease they have created tables by code like this
Quote:
Public Function GetDeductibleTable() As DataTable Dim dtLargeDeduct As DataTable = New DataTable("DeductibleTable") With dtLargeDeduct .Columns.Add(enmRateLargeDeductible.ApplicationID.ToString, System.Type.GetType("System.Int32")) .Columns.Add(enmRateLargeDeductible.CreditRuleCompensation.ToString, System.Type.GetType("System.Double")) .Columns.Add(enmRateLargeDeductible.AcquisitionExpense.ToString, System.Type.GetType("System.Double")) .Columns.Add(enmRateLargeDeductible.ProfitContingency.ToString, System.Type.GetType("System.Double")) .Columns.Add(enmRateLargeDeductible.GeneralOverheadExpense.ToString, System.Type.GetType("System.Double")) .Columns.Add(enmRateLargeDeductible.Taxes.ToString, System.Type.GetType("System.Double")) .Columns.Add(enmRateLargeDeductible.TotalLDDPremium.ToString, System.Type.GetType("System.Double")) .Columns.Add(enmRateLargeDeductible.IsDeduct.ToString, System.Type.GetType("System.String")) .Columns.Add(enmRateLargeDeductible.LocationNumber.ToString, System.Type.GetType("System.String")) .Columns.Add(enmRateLargeDeductible.EmployerID.ToString, System.Type.GetType("System.Int32")) End With Return dtLargeDeduct End Function
there is hundreds of table created like above, my question is if I define all those table in Dataset (.XSD) file and get required table by using SXD like this
Quote:
Dim dt as DataTable = new ApplicationTableSchema.DeductibleTable()
"ApplicationTableSchema" is a XSD file where I added "DeductibleTable" table. will it be faster than earlier approach?