Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6047635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:22:21+00:00 2026-05-23T07:22:21+00:00

My project requires me to create a database object (a custom class) containing a

  • 0

My project requires me to create a database object (a custom class) containing a list of tables, each table containing a list of columns. The columns and tables object have specific properties not available in the database. For example label, max value, min value and so on.

All these custom properties are stored in database tables, which the user can modify. These properties will be used in various web forms.

My question: Is is wise to keep connecting to the database to find out these extended properties for each form, OR create a object (as explained above) and store all the tables, columns as lists and store that BIG object as an application variable.

I was also thinking to put the object in the cache and expire it whenever users make changes to the extended properties.

Can someone tell me if the best of the above 3 approaches or any other method to ensure best performance.

Thanks

Edit: This has to be a generic solution that should work on ANY database. So potentially, there could be a large number of tables (50-120) each having 10-30 columns

Edit2: I was also thinking of dynamically creating classes (like Entity framework does) and loading them using reflections.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T07:22:21+00:00Added an answer on May 23, 2026 at 7:22 am

    Seeing as you are only caching meta data and no data, the amount to store is relatively small.

    You have two options, as I see it:

    • Store in the Application object, which is available to all sessions and will not expire (but will be around until the app pool is reset)
    • Store in a Cache entry which allow you to set a future expiration or database dependency so you can refresh the data.

    Since you say the user can change the data, a Cache with a database dependency looks like the right choice, though this is only supported directly with the SqlCacheDependency class (so only applies to SQL Server).

    A more generic approach would be a cache that expires and causes a polling of the DB on expiration.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In our web project, we have a custom Database Connection class that creates the
I have a project that requires user-defined attributes for a particular object at runtime
I have a project the requires the use of the exec family. My project
I'm starting a project which requires reading outlook msg files in c#. I have
We have an old project that requires occasional maintenance that uses VS2003 and Dot
I have a project that requires me to do development in SQL Server 2005,
In the past, some of my projects have required me to create a movie
My project requires a file where I will store key/value pair data that should
My project requires a background thread to initiate the creation of a WPF control
I've got a project which requires a fairly complicated process and I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.