I create Asp.Net Mvc4 application with Code First EF. I create my model, and now I want get relational info from Database. I write get method for this info as follow:
public IQueryable<Invoice.Model.Invoice> Invoices
{
get
{
return context.Invoices.Include("InvoiceItems").Include("InvoiceStatus").Include("BankAccount").Include("TaxType").Include("Contract");
}
}
Then I use this properties in my operations, but relational info suach as InvoiceStatus return null,, How can fix this problem? Thanks in advance.