Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Studio
  4. Retrieving data table structure from XSD schema is faster than creating by code in .net?

Retrieving data table structure from XSD schema is faster than creating by code in .net?

Scheduled Pinned Locked Moved Visual Studio
databasequestioncsharpasp-netdesign
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 2809616
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups