I am creating web api for application which support football team in collecting statistic data from matches. I am on implementing phase now. And lets say I am thinking what (if it is needed) type of design patter will be best for something like this:
public class Shot
{
public int Id { get; set; }
public int PlayerId { get; set; }
public string Comment { get; set; }
public bool OnGoal { get; set; }
public int GameId { get; set; }
}
and
public class Card
{
public int Id { get; set; }
public int PlayerId { get; set; }
public string Comment { get; set; }
public bool IsRed{ get; set; }
public int GameId { get; set; }
}
As You can see some properties are same. It should be implemented with interface, inheritance ( f.e. class Action) or maybe I should use one of Design patterns (which one)? What will be best for Entity Framework to avoid problems in later phases?
Aucun commentaire:
Enregistrer un commentaire