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

Support for Extension Properties #2955

Closed
satyajit-behera opened this issue Aug 28, 2015 · 5 comments
Closed

Support for Extension Properties #2955

satyajit-behera opened this issue Aug 28, 2015 · 5 comments

Comments

@satyajit-behera
Copy link

There is a very beautiful concept of extension properties for extending an existing class without touching the base code.
The details of its implementation can be found in this link:
http://www.codeproject.com/Articles/399932/Extension-Properties-Revised

Is it possible to support similar functionality for the extending Entities in EF.

Thanks

@davidroth
Copy link
Contributor

I think this is covered by the support of "shadow properties" in EF7. Here is a good demo video showing this feature: https://channel9.msdn.com/Blogs/Seth-Juarez/Shadow-Properties-in-Entity-Framework-7

@satyajit-behera
Copy link
Author

@davidroth EF7, It does not contain TPT and I cannot even think of getting into it without that in my existing projects.

@divega
Copy link
Contributor

divega commented Aug 31, 2015

@davidroth I agree that the concepts are similar and that they may overlap in some scenarios. However, with shadow properties the EF context owns the storage of the values and becomes the main way to get to them. With the "extension properties" approach described in the article, property values are addressed through the entities themselves and stored outside of EF.

@satyajit-behera we don't intend to support something like this in the initial 7.0.0 release, but there is a feature that we have discussed in the past that should make this possible by making EF aware of non-standard property access patterns. I couldn't find an issue for it so I have added it at #2968.

Re TPT, we are using the bug you filed #2266 to track the feature request. We will prioritize it based on feedback, but for certain TPT won't be supported in the initial release of EF 7.

@satyajit-behera
Copy link
Author

@divega @davidroth Thanks for your comments. Looks like "Shadow Properties" is what I was looking for. If the EF Context owns these properties, nothing like it. Awesome. I need to try out the implementation to know how it works for me.

Will look forward for EF 7 final release with Shadow Properties and TPT (Right now, I don't have an option or alternative to TPT in all my existing implementations). I have used it in all my projects.

@rowanmiller
Copy link
Contributor

BTW we also have another issue #240 to track allowing you to specify how to get/set data aside from just using properties.

@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants