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

  • SEARCH
  • Home
  • 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 4105384
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T21:14:23+00:00 2026-05-20T21:14:23+00:00

We have a model class defined that I want to produce from our EF

  • 0

We have a model class defined that I want to produce from our EF 4.0 edmx for persistence. The class looks roughly as follows:

    [DataContract]
public class Schedule
{
    [DataMember]
    public string Name { get; set; }

    [DataMember]
    public Guid Id { get; set; }

    [DataMember]
    public DateTime RunDate { get; set; }

    [DataMember]
    public IList<Guid> Routes { get; set; }
    [DataMember]
    public IList<Guid> Paths { get; set; }
}

How do I represent Routes and Paths on the edmx design surface? I can’t see anyway of doing this other than creating two entities with a single Guid Id field then setting a 1-* Association to Schedule. I’d rather not have to do that as we’ll then have a Route and Path class that isn’t what we want at the moment.

We haven’t had chance to look at Code First yet and don’t really have time to figure it out for this project but would it support our needs?

Thanks for any assistance.

  • 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-20T21:14:23+00:00Added an answer on May 20, 2026 at 9:14 pm

    You must either use related entities or you musn’t map them directly. You can for example map another fields called RoutesSerialized and PathsSerialized which will be of type string and contains all Guids stored as strings and separated by semicolon. Your current properties will use return IEnumerable and use internally use functions like String.Join, String.Split, ToString and Guid.Parse.

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

Sidebar

Related Questions

I have a model that looks something like this: public class SampleModel { public
I have a simple model that is defined as: class Article(models.Model): slug = models.SlugField(max_length=50,
Lets say I have model inheritance set up in the way defined below. class
I have a model defined this way class Lga < ActiveRecord::Base validates_uniqueness_of :code validates_presence_of
I have a model defined as below: class Example(models.Model): user = models.ForeignKey(User, null=True) other
I have an entity defined as in a db First Model: public class Merlin_BR_Condiciones_Item
All, i have the following model defined, class header(models.Model): title = models.CharField(max_length = 255)
I have a model class that uses a custom validator as shown in following
I have a model like this defined... public class Product{ private long timestamp; //
I have class model for XML structure, where i want parse xml into it.

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.