Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use dynamic proxy objects instead of LazyReference<T> #1

Open
darxis opened this issue Mar 27, 2017 · 0 comments
Open

Use dynamic proxy objects instead of LazyReference<T> #1

darxis opened this issue Mar 27, 2017 · 0 comments

Comments

@darxis
Copy link
Owner

darxis commented Mar 27, 2017

In the current version, for each Reference you need to define in your model a field of type LazyReference.

Ex:

public class Course
{
   ...

    private LazyReference<Department> _departmentLazy = new LazyReference<Department>();

    public Department Department
    {
        get
        {
            return _departmentLazy.GetValue(this, nameof(Department));
        }
        set
        {
            _departmentLazy.SetValue(value);
        }
    }

    ...

}

Using dynamic Proxy objects would be better, because you don't have to define in your model such fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant