Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. var ocorrencia = db.Ocorrencia
  2. .Include("Pessoa")
  3. .FirstOrDefault(c => c.id == 3);
  4.  
  5. public partial class Ocorrencia
  6. {
  7. [Key]
  8. public int id { get; set; }
  9. public Pessoa Pessoa { get; set; }
  10. public int PessoaId { get; set; }
  11. }
  12.  
  13. public class Pessoa
  14. {
  15. [Key]
  16. public int id { get; set; }
  17. public string nome { get; set; }
  18. }
  19.  
  20. public int PessoaId { get; set; }
  21.  
  22. public int? PessoaId { get; set; }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement