Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
All,
I have two classes State and Transition. There are two foreign keys in transition that refer to state as per below:
C#
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

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900