-
Notifications
You must be signed in to change notification settings - Fork 10
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
How to track just the list inside a class? #49
Comments
Hey! Thank you for using TrackerDog. I see. The issue here is that there's no public interface to tackle this problem at the moment. See this:
...which isn't part of any So, you want to build the whole tracked list this way, right?
Am I on the right track? |
Yes. That would make my class very similar to EF DbContext, which has trackable DbSet classes. |
Anyway, would be really disturbing that you might design a class with just that property for a while? When I tried to provide a solution to other issues, I've found myself stuck, because my VM with Windows 10 and VS2017 is broken, and now my main OS is Linux since a year. I believe that the best I can do is to provide just the .NET Standard Library distribution, and deprecate the Full Framework-specific one, so I may be able to provide solutions and releases sooner... If this is really disturbing, I can implement the solution and publish the new .NET Standard Library NuGet package version with your requested feature, and later the other one for the Full Framework. Are you on .NET Core? |
Thanks for the prompt reply and taking action on the issue so early. I am using .net core and don't need a full framework solution. If you want, I can submit a PR if you let me know what needs to be done. I can validate the solution on my windows machine as well. Thanks. |
The PR would be really wonderful, but I guess you'll have a good headache. While that unpublished method is a good approximation to what you need, we need a new one which may not require a parent object (an owner) of the whole collection but just the collection type or an existing collection instance. It should be an easy one, but I'm not sure if you would be able to handle it without understanding how it works (it's not as easy as publishing the method). I'll try to solve this tonight or tomorrow and I'll give you some output about what I've achieved in that moment. |
I am creating a custom DbContext class which requires a List of entities that I want to track. I want to attach tracker only to the list but the samples in documentation say that the tracker needs to be configured for the containing class as well. Here is how my code looks at the moment, which is not ideal.
How can I attach tracker to just the TrackedEntities list and not the CustomDbContextBase?
The text was updated successfully, but these errors were encountered: