Questions tagged [self-tracking-entities]

In an Entity Framework-based application, a context is responsible for tracking changes in your objects. Self-Tracking Entities (STEs) can help you track changes in any tier and then replay these changes into a context to be saved.

In an Entity Framework-based application, a context is responsible for tracking changes in your objects. You then use the SaveChanges method to persist the changes to the database. When working with N-Tier applications, the entity objects are usually disconnected from the context and you must decide how to track changes and report those changes back to the context.

Self-Tracking Entities (STEs) can help you track changes in any tier and then replay these changes into a context to be saved.

WARNING: STEs are no longer recommended.

More Info

174 questions
3
votes
2 answers

Is it recommended to use Self Tracking Entities with WCF services?

I want to know if using Self Tacking Entities (in Entity Framework) is recommended with WCF services? If yes, then can you guide me to a tutorial which may guide how to do that? Actually, I am going to develop a WPF application using Prism with MEF…
Baig
  • 1,489
  • 1
  • 25
  • 41
3
votes
1 answer

EF4 Self-Tracking entities and WCF serialization creates stack overflow

I try to get above configuration working, but with no luck. Step 1) I started a new solution with a WCF Service Application project. Step 2) In this project, I added an edmx file and create a very simple model: Entity Parent with Id and…
3
votes
2 answers

Self-tracking Entity - Tries to insert an unchanged entity when adding to collection

Using EF4 Self-tracking entities. I have a "User" entity that has a collection of "Groups" the user can belong to. I want to add/remove some "Groups" to this user given just a list of Group IDs. public void UserAddGroups(int userID, List
Tri Q Tran
  • 5,500
  • 2
  • 37
  • 58
3
votes
1 answer

EF4 STE include-path....exclude-path?

Context: Repository-pattern, WCF, WPF/SL In my Repository of self-tracking Entities i need to explicitly load some related properties in order to correctly process the query. Those are not the includes requested by the client and i would like to get…
3
votes
1 answer

Trouble updating self-tracking entities

I'm using self-tracking entities in a WCF client-server application. My WCF service returns various entities, and these can be updated using corresponding Update methods. This worked well for a while, but now I'm having problems. To keep the focus,…
Tor Haugen
  • 19,509
  • 9
  • 45
  • 63
3
votes
1 answer

EF4 DAL design and the ObjectContext: Argument with co-worker

I work with a senior developer who is a guru .NET architect. We have had many constructive arguments over the last 6+ months and generally I concede defeat in most of our discussions. I have learned stacks from working with him. There is one design…
3
votes
1 answer

How to track disconnected entities over Web API

Assuming I have an application that allows customers to add/update products into my database over Web API. I have lightweight DTOs like this: public class ProductDTO { public int Id { get; set; } public string Name { get; set; } public…
Null Reference
  • 11,260
  • 40
  • 107
  • 184
3
votes
4 answers

Self Tracking Entities (STE)'s and partial updates with EF4 and mVC2

I have an MVC2 app where I am starting to use the STE's. I am looking for some clarification on how updates should work. Background: If I have a Blog entity with related category entities and Related post/comment entities. In MVC I am rendering a…
Jay
  • 2,644
  • 1
  • 30
  • 55
3
votes
1 answer

Does there exist a T4 Template for generating a WCF service to provide Get and Save for Self Tracking Entities?

I'm working with self tracking entities on a n-tier application. So I have a WCF service which provides the client access to the data layer and I find myself implementing a lot of the "same" functions corresponding with Getting some entities from…
2
votes
2 answers

InvalidOperation in T4 Generated Helper Method SelfTrackingModel.Context.Extensions

I have a project whereby I'm using STE's (EF4.1) and I'm hitting a reproducable issue when I call the auto generated ApplyChanges() method on one of my object sets, passing in an object graph I have held in memory, and I'm getting the following…
2
votes
1 answer

how to notify child object modifications to parent object using ObjectWithChangeTracker

Created Objects using Ado.net Self Tracking Entity Generator for maintain the state tracker. The Objects are User, Trainer. Trainer is the child object in User. When a information modified in Trainer, it state is changed as modified. but the user…
VIJAY
  • 849
  • 11
  • 22
2
votes
1 answer

How to save self tracking entities in entity framework?

This is my database structure I have four tables. Table LocalArea and Lanungaue have master data and which refered by the tables Address and AddressTranslated Now I want to add rows in Address and AddressTranslated table I used following code…
2
votes
4 answers

How do I undo all changes made to a Self-Tracking Entity?

I have a client application that downloads a number of STE's via WCF. Using a WPF application, users can select an entity from a ListBox, and edit it via a popup UserControl. As the UserControl is bound directly to the object, when a user makes a…
mortware
  • 1,910
  • 1
  • 20
  • 35
2
votes
2 answers

Self Tracking Entities Traffic Optimization

I'm working on a personal project using WPF with Entity Framework and Self Tracking Entities. I have a WCF web service which exposes some methods for the CRUD operations. Today I decided to do some tests and to see what actually travels over this…
Ivan Nikolov
  • 793
  • 4
  • 15
2
votes
1 answer

Entity Framework Self Tracking Entities on a N-Tier application

This is a general architecture question, hopefully to folks out there already using EF in final applications. We have a typical N-Tier application: WPF Client WCF Services EF STE DTO's EF Data Layer The application loads all known business types…
1 2
3
11 12