Entity framework does not seem to lazy load related records if the key is unique and non-clustered. Just wanted to know if I am doing something wrong.
Say I have two tables - Employee and EmployeeTransactions.
EmployeeID is UNIQUE NONCLUSTERED but not the primary key of the table.
Assume for the question's sake, it is generated by another data base and inserted into the employee table.
However, most other tables have an EmployeeID which is a foreign key to table Employees
--Table Employee
DBGEneratedPK
EmployeeID (Unique NonClustered, Indexed)
-- Table EmployeeTransactions
TransactionID (PK Clustered)
EMployeeID (FK into Table A)
Other columns
Now, when I use entity framework to retreive an employee it does not show me the option of lazy loading employeetransactions?
employee.employeetransactions
Is this a limitation of EF?