private void SeedEthnicityTypes(DataContext context) { List <string> items = new List <string>() { "Hispanic or Latino", "Not Hispanic or Latino" }; foreach (string item in items) { var entity = context.EthnicityTypes.Where(p => p.Name == item && p.Deleted == false).SingleOrDefault(); if (entity == null) { entity = new EthnicityType(); entity.Name = item; context.EthnicityTypes.Add(entity); } } }
public Ethnicity(EthnicityType ethnicityType) { Value = ethnicityType; switch (ethnicityType) { case EthnicityType.Unknown: Text = "Unknown"; break; case EthnicityType.Cuban: Text = "Cuban"; break; case EthnicityType.Mexican: Text = "Mexican"; break; case EthnicityType.PuertoRican: Text = "Puerto Rican"; break; case EthnicityType.OtherSpecificHispanic: Text = "Other Specific Hispanic"; break; case EthnicityType.HispanicOriginNotSpecified: Text = "Hispanic - Specific Origin Not Specified"; break; case EthnicityType.NotOfHispanicOrigin: Text = "Not of Hispanic Origin"; break; default: throw new System.Exception($"Unknown ethnicityType: {ethnicityType}"); } }
public Traveler(string name, EthnicityType ethnicity, int locationID) : base(name, ethnicity, locationID) { _locationsVisited = new List <int>(); _inventory = new List <TravelerObject>(); }
public Character(string name, EthnicityType ethnicity, int locationID) { _name = name; _ethnicity = ethnicity; _locationID = locationID; }