Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
darxis authored Mar 27, 2017
1 parent 6c62120 commit 126f31f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,18 @@ public class MyDbContextFactory : IDbContextFactory<MyDbContext>
```
3. In your model you need to declare References using the type LazyReference<T> as in the example below:
```c#
public class Course
public class Department
{
private LazyReference<Department> _departmentLazy = new LazyReference<Department>();
public Department Department
private LazyReference<Instructor> _administratorLazy = new LazyReference<Instructor>();
public Instructor Administrator
{
get
{
return _departmentLazy.GetValue(this, nameof(Department));
return _administratorLazy.GetValue(this, nameof(Administrator));
}
set
{
_departmentLazy.SetValue(value);
_administratorLazy.SetValue(value);
}
}
}
Expand Down

0 comments on commit 126f31f

Please sign in to comment.