-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
External disconnected entity change tracking system to interact with EF-server #8744
Comments
@weitzhandler http://trackableentities.github.io/ (currently not support for EF Core) ? |
@ErikEJ |
Ping @tonysneed - any comments? |
@ErikEJ
|
Hi and thanks for the ping! Yes you absolutely can use TE without the T4 templates. The server bits just need two properties on an entity: TrackingState enum and ModifiedProperties string array (for partial updates).
The reason for the T4 templates really is for a) convenience and b) on the client to support change tracking.
Hope this helps!
|
@tonysneed wow tx for your quick answer.
|
EntityBase is what you want on the client. Have a look at the sample in the TE repo: https://github.com/TrackableEntities/trackable-entities/tree/develop/Samples/VS2013/WebApiSample
By the way, the T4 templates are just NuGet packages, so they can be used on their own without the VS extension.
The Put action is quite simple: just call ApplyChanges on the DbContext, passing in the top objects(s) in the graph. See the OrdersController in the sample for all the actions and best practices: https://github.com/TrackableEntities/trackable-entities/blob/develop/Samples/VS2013/WebApiSample/WebApiSample.WebApi/Controllers/OrderController.cs
Cheers,
Tony
|
Thank you very much Tony!!! Would be a great idea adding your project to .NET foundation and draw more community attention to it. |
Happy to be of service! Would be great to make it into the .NET Foundation, but I think they are pretty selective. :))
I am working on a port to .NET Standard 2.0. Have been waiting also on an update to the graph API in EF Core v2, which is needed for the TE API, so I'll sync up with that soon.
Cheers,
Tony
… On Jun 6, 2017, at 9:47 PM, Shimmy ***@***.***> wrote:
Thank you very much Tony!!!
Would be a great idea adding your project to .NET foundation and draw more community attention to it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Well here's their checklist. I'm sure you've gone that far you'll go that bit more to make it into the dnf... Should I close this issue or keep it open for the reference of for some MS ppl to see it? And BTW, (self-quoting):
Apparently I was utterly wrong... |
I'm also planning on a release of the VS extension for VS 2017. That takes some time because of the multi-project templates.
|
@tonysneed Curious what APIs you are waiting on? |
@ajcvickers It's #7389 Provide access to referencing entity in TrackGraph. Looks like it's in the 2.0.0 milestone. |
@tonysneed Yep, it is. I'll make sure it gets done. 😸 Would be interested to hear any other feedback you have while working on this. New APIs, confusing behaviors, etc. |
@ajcvickers Thanks for working on that! I'll be sure to grab the nightlies and start playing. 😄 Happy to provide feedback on the API's! |
Closing as a dupe of #5536 with a comment there to look at this discussion when implementing. |
Related to #5536 #4424 #8739
I'd want the entire metadata and tracking system in EF to be extracted to an external non-EF dependent assembly, so to allow change-tracking and interaction with the EF-enabled-server from a non-EF client.
There should also be a minimized graph that efficiently serializes only the necessary data, meaning for added entities: the entire entity, delete entities: the id, for modified, only modified properties along with their values.
For example
Server (get):
Client:
Each entity in graph is a proxy class that implements an interface that exposes some change tracking and graph stuff or managed via a centralized EF client tool. Each entity should also have a Guid etc. that goes along the wire regardless of its DB id, so we can identify it regardless of its state.
A serializer will construct the proper
IGraphChangeData
for client/server, or should be a concrete.Server (put):
This is so compelling.
The text was updated successfully, but these errors were encountered: