Using ADO.net Entity Framework 4 with Enumerations? How do I do it ?
- by Perpetualcoder
Question 1: I am playing around with EF4 and I have a model class like :
public class Candidate {
public int Id {get;set;}
public string FullName {get;set;}
public Gender Sex {get;set;}
public EducationLevel HighestDegreeType {get;set;}
}
Here Gender and EducationLevel are Enums like:
public enum Gender {Male,Female,Undisclosed}
public enum EducationLevel {HighSchool,Bachelors,Masters,Doctorate}
How do I get the Candidate Class and Gender and EducationLevel working with EF4 if:
I do model first development
I do db first development
Edit: Moved question related to object context to another question here.