Click here to Skip to main content
12,887,625 members (36,988 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# .NET
I have two classes State and Transition. There are two foreign keys in transition that refer to state as per below:
public partial class State
	public int StateId { get; set; }
	public int WorkflowId { get; set; }
	public string StateName { get; set; }
	public string Description { get; set; }
        //Needs ICollection types here for the Foreign Keys
public partial class Transition
	public int TransitionId { get; set; }
	public Nullable<int> FromState_StateId { get; set; }
	public Nullable<int> ToState_StateId { get; set; }

My question is this how I name the I collection types in State that will hold the collections of ToTransitions and FromTransition variables in the transition class

I have no problem with one... the difficulty I am having is when the second one is introduced... I've tried The data annotation namespace but cannot get it to work.

If anyone can point me in the right direction I'd much appreciate it!

I am using Code First VS2012

Many Thanks.
Posted 11-Nov-12 0:10am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170424.1 | Last Updated 11 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100