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 7761537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:09:41+00:00 2026-06-01T14:09:41+00:00

I am working on a MVC3 code first web application and after I showed

  • 0

I am working on a MVC3 code first web application and after I showed the first version to my bosses, they suggested they will need a ‘spare’ (spare like in something that’s not yet defined and we will use it just in case we will need it) attribute in the Employee model.

My intention is to find a way to give them the ability to add as many attributes to the models as they will need. Obviously I don’t want them to get their hands on the code and modify it, then deploy it again (I know I didn’t mention about the database, that will be another problem). I want a solution that has the ability to add new attributes ‘on the fly’.

Do any of you had similar requests and if you had what solution did you find/implement?

  • 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-06-01T14:09:43+00:00Added an answer on June 1, 2026 at 2:09 pm

    I haven’t had such a request, but I can imagine a way to get what you want.
    I assume you use the Entity Framework, because of your tag.

    Let’s say we have a class Employee that we want to be extendable. We can give this class a dictionary of strings where the key-type is string, too. Then you can easily add more properties to every employee.

    For saving this structure to the database you would need two tables. One that holds the employees and one that holds the properties. Where the properties-table has a foreign-key targeting the employee-table.

    Or as suggested in this Q&A (EF Code First – Map Dictionary or custom type as an nvarchar): you can save the contents of the dictionary as XML in one column of the employee table.

    This is only one suggestion and it would be nice to know how you solved this.

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

Sidebar

Related Questions

I'm working on an MVC3 Razor web application which gets it's page decoration from
I'm working on ASP.net MVC3 Web application that is facing scalability issue. For improving
I'm working on Asp.net MVC3 web application. I'm having one page on which appx.
I've been working on writing my first MVC3 application for a little while and
I am working on a simple web application made using Entity Framework 4.1 Code
I'm working on a MVC3 web-application and encounter a problem when passing values from
Im working on a MVC3 project using code first entity framework. On a webpage
I'm working on a MVC3 web application. I want a list of categories shown
I am working on a mvc3.0 app using EF code first and mvc scaffolding.
I'm working on a wiki project. MVC3 + EF4 Code First. All classes from

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.