Skip to content

Instantly share code, notes, and snippets.

@jfbueno
Created June 1, 2016 12:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfbueno/f12d7f29b970963d6b9ef513833b7054 to your computer and use it in GitHub Desktop.
Save jfbueno/f12d7f29b970963d6b9ef513833b7054 to your computer and use it in GitHub Desktop.
Relação pro mesmo model
[Key, ForeignKey("Entity")]
public int EntityId { get; set; }
public virtual Entity Entity { get; set; }
[ForeignKey("Headquarter")]
public int HeadquarterId { get; set; }
public virtual Customer Headquarter { get; set; }
public virtual List<Customer> Branches { get; set; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment