Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# .NET
All,
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
0 OriginalGriff 330
1 Richard Deeming 240
2 Nirav Prabtani 212
3 CHill60 170
4 _Amy 165
0 OriginalGriff 8,104
1 Sergey Alexandrovich Kryukov 7,045
2 Maciej Los 4,039
3 Peter Leow 3,738
4 CHill60 2,912


Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 11 Nov 2012
Copyright © CodeProject, 1999-2014
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