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

173 questions
5
votes
3 answers

Empty reference.cs file adding service reference with reuse types option checked

Scenario Visual Studio 2010 Silverlight 4 Entity Framework Self-tracking entities Problem On the server side, we have generated entity objects using Entity Framework model. We have used self tracking T4 templates to generate the entities. These…
Nadya
  • 51
  • 1
  • 2
5
votes
2 answers

Where to place the entity framework in our solution?

Okay, so we have a solution that contains the following projects: BusinessLogic Entities DataAccess Utilities UnitTests UserInterface It is a very large enterprise-level application. My question is, where do we put the entity framework? On one…
5
votes
1 answer

EF4: Difference between POCO , Self Tracking Entities , POCO Proxies

Can someone point me the difference between POCO , Self Tracking Entities , POCO Proxies? Actually, I am working Entity Framework 4.0 and POCO(Repository Pattern) and whenever I do some changes in the POCO and call ObjectContext.Savechanges then it…
indiPy
  • 7,115
  • 3
  • 25
  • 39
5
votes
3 answers

How to keep track of objects deleted from an ObservableCollection in CRUD scenarios?

In our multi-tier business application we have ObservableCollections of Self-Tracking Entities that are returned from service calls. The idea is we want to be able to get entities, add, update and remove them from the collection client side, and…
5
votes
1 answer

Replacement of Self-tracking entities in Entity Framework 6

I am sure most of .NET developers must be facing this issue one way or the other. The problem is simple, I am upgrading my project from .NET 4 to .NET 4.5.1. So far so good the upgrade went neatly. But when I upgraded from EF4 to EF6, I did…
Talha Masood
  • 983
  • 1
  • 7
  • 22
5
votes
1 answer

What is the path forward for changetracking complex entity relationships if Self Tracked Entities are not recommended anymore?

I have been using EF since it first came out. Used to hand build POCOs in 3.5 and was glad to see Self Tracked Entities(STE) in EF4.0. I have use STEs in a couple of very large projects(500+ entities, some with multiple models). In these projects I…
GregJF
  • 410
  • 4
  • 12
5
votes
1 answer

Self-tracking entities not recommended anymore. What is?

Reading the msdn information on EF 5.0 and n-tier solutions see link , it seems that MS is not recommending STE's and the POCO/DTO way is also not recommended by stating that it is difficult. Not all (perhaps not many?) applications are suited for…
nobba
  • 135
  • 6
4
votes
2 answers

System.InvalidOperationException: Mapping and metadata information could not be found for EntityType

I have an ASP.NET 4.0 web application that uses Entity Framework 4.3.1 and Self-Tracking Entities. It works fine until I add another ADO.NET Entity Data Model (.edmx) file to it. After that the project compiles without any errors, but as soon as it…
4
votes
3 answers

Preventing StackOverflowException while serializing Entity Framework object graph into Json

I want to serialize an Entity Framework Self-Tracking Entities full object graph (parent + children in one to many relationships) into Json. For serializing I use ServiceStack.JsonSerializer. This is how my database looks like (for simplicity, I…
4
votes
2 answers

EF + WCF in three-layered application with complex object graphs. Which pattern to use?

I have an architectural question about EF and WCF. We are developing a three-tier application using Entity Framework (with an Oracle database), and a GUI based on WPF. The GUI communicates with the server through WCF. Our data model is quite complex…
Mark Vincze
  • 6,895
  • 5
  • 35
  • 75
4
votes
1 answer

Entity Framework & Self-Tracking Entities vs POCO

If i'm wanting to use entity framework 4 as my data layer and want to send my entities to another tier whether it be via WCF or another mechanism and then want the ability to update the entities and send them back for updating/deleting/inserting is…
coding4fun
  • 7,611
  • 9
  • 53
  • 76
4
votes
1 answer

How to stop Self-tracking entity performing Add instead of Update

Apologies in advance for the length of this question! I have a data structure from which the following Enity Data Model has been created (tables/fields renamed and simplified for ease of understanding!): The PaymentMethod / ProductPaymentMethod…
4
votes
1 answer

What is the proper way to handle non-tracking self tracking entities?

Self tracking entities. Awesome. Except when you do something like return Db.Users; none of the self-tracking entities are tracking (until, possibly, they are deserialized). Fine. So we have to recognize that there is a possibility that an…
3
votes
0 answers

Why doesn't WCFTestclient understand standard EF objects but understands STE objects

When I try to consume a WCF service which expose operations that return standard EF objects I receive a warning on these operations. The warning states "This operation is not supported in the WCF Test Client because it uses type < EntityName >". The…
Fknut
  • 123
  • 6
3
votes
1 answer

Subscribing To The Self Tracking Entities PropertyChanged Event

I am writing a WPF application using Self-Tracking Entities. I'm having trouble Disabling/Enabling my Save button as my Model's values are changed. Normally with the regular Entity Framework Model I am able to simply subscribe to the…
ccorrin
  • 502
  • 1
  • 5
  • 21
1
2
3
11 12