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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:13:54+00:00 2026-05-22T01:13:54+00:00

I have been playing around quite a lot with EF4 Code First and I

  • 0

I have been playing around quite a lot with EF4 Code First and I do love it. However, I cannot seem to sort this easy one out.

When trying to create something like this, no columns are created in my database:

    public IList<String> Recievers { get; set; }
    public List<String> RecieversTest { get; set; }

    public virtual List<String> RecieversAnotherTest { get; set; }
    public virtual ICollection<Int32> RecieversAnotherTest { get; set; }

Ive tried Annotations to map it to a different column name, I’ve tried IEnumerable and all sorts of other collections, but it refuses to create a column for it.

After an hour on google I found one that claims she has done it, but I’m starting to doubt that. Should it even be possible?

I can’t really see why it just doesn’t create a column and use JSON or CSV.
It can’t be that rare, can it? In my case i just want to store a list of emails.

What am I missing? The project creates all other types without problems, and I’ve inspected the database to see how other properties I add to test with gets created, while these gets ignored.

So the problem must lie in some setting I’m missing or some configuration….
EF 4.1 RTW on an SQL Server 2008 db.

  • 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-22T01:13:55+00:00Added an answer on May 22, 2026 at 1:13 am

    I have bad news for you. EF doesn’t do anything like that. If you want any serialization and deserialization you must do it yourselves = you must expose and map property with serialized value:

    private IList<String> _receivers;
    // This will be skipped
    public IList<String> Receivers 
    { 
        get
        {
            return _receivers;
        }
        set
        {
            _receivers = value;
        } 
    }
    
    // This will be mapped
    public string ReceiversSer
    {
        get
        {
            return String.Join(";", _receivers);
        }
        set
        {
            _receivers = value.Split(';').ToList();
        }
    }
    

    Now ReceiversSer will be mapped to a column in the database.

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

Sidebar

Related Questions

I have been playing around with a quite complex SQL Statement for a few
I have been playing around with the Gowalla API, and was wondering if anyone
I have been playing around with jQuery for a bit now, and am really
I have been playing around with Rake and Albacore, to see if I can
I'm brand new to Google App Engine and have just been playing around with
i have been playing around with MVC. I am currently stumped on with html
i have been playing around with apache SOLR since last 3 weeks and very
I have been playing around with GTK since a couple of days now,while going
I have been playing around with silverlight for a couple of days now and
I have been playing around with the canvas element in HTML5 and I am

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.