Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var ocorrencia = db.Ocorrencia
- .Include("Pessoa")
- .FirstOrDefault(c => c.id == 3);
- public partial class Ocorrencia
- {
- [Key]
- public int id { get; set; }
- public Pessoa Pessoa { get; set; }
- public int PessoaId { get; set; }
- }
- public class Pessoa
- {
- [Key]
- public int id { get; set; }
- public string nome { get; set; }
- }
- public int PessoaId { get; set; }
- public int? PessoaId { get; set; }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement