public enum FruitType {
Banana,
Mango,
Orange
}
public class Fruit {
public int Id { get; set; }
public FruitType Type { get; set; }
public int TreeId { get; set; }
public Tree Tree { get; set; }
}
public class Tree {
public int Id { get; set; }
public IList<Fruit> Fruits { get; set; }
public string Name { get; set; }
}
So this is my domain from now on. I have a simple enum and two entities in a one to many relationship. Simple enough!
0 comments:
Post a Comment