title: How to access data in foreign key table
body: <p>I have 2 tables - Book and Ticket(id,borrowingDate,landingDate,idBook) - 
  I need a method that verifies if a book is available or not using my DateTime properties; if borrowingDate is null -> available book
  There are my model classes: 
  Book: </p>
  
  <pre><code> public class Book
      {
          public Book()
          {
  
          }
          [Key]
          public int IdBook { get; set; }
          public string Title { get; set; }
  
          [ForeignKey("Author")]
          public int IdAuthor{ get; set; }
          public Author Author { get; set; }
          public ICollection&lt;Ticket&gt; Tickets { get; set; }
      }
  </code></pre>
  
  <p>Ticket: </p>
  
  <pre><code>  public class Ticket
      {
          public Ticket()
          {
  
          }
  
          [Key]
          public int IdTicket { get; set; }
          public DateTime BorrowingDate { get; set; }
          public DateTime EstimatedLandingDate { get; set; }
          public DateTime? LandingTime { get; set; }
  
          [ForeignKey("Book")]
          public int IdBook { get; set; }
          public Book Book { get; set; }
      }
  </code></pre>