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
1
vote
2 answers

Should the entity framework + self tracking entities be saving me time

I've been using the entity framework in combination with the self tracking entity code generation templates for my latest silverlight to WCF application. It's the first time I've used the entity framework in a real project and my hope was that I…
sipsorcery
  • 30,273
  • 24
  • 104
  • 155
1
vote
1 answer

Entity Framework - Foreign key constraints not added for inherited entity

It appears to me that a strange phenomenon is occurring with inherited entities (TPT) in EF4. I have three entities. 1. Asset 2. Property 3. Activity Property is a derived-type of Asset. Property has many activities (many-to-many) When modeling this…
Tri Q Tran
  • 5,500
  • 2
  • 37
  • 58
1
vote
2 answers

Entity Frameworks 4 - Changing the model does not update the T4 self tracking template files

I am using self tracking entities and have moved the entity classes to another assembly by using 'Add as link' to point to the TT file as mentioned here. Now though, when I update the model (for instance change a property name) the template is not…
Darren
  • 47
  • 5
1
vote
5 answers

EF 4 Self Tracking Entities does not work as expected

I am using EF4 Self Tracking Entities (VS2010 Beta 2 CTP 2 plus new T4 generator). But when I try to update entity information it does not update to database as expected. I setup 2 service calls. one for GetResource(int id) which return a resource…
ashraf
  • 1,319
  • 2
  • 16
  • 24
1
vote
0 answers

STE availability in Entity Framework 6

I can't find information if there will be support for STE (self tracking entities) in Entity Framework 6. I would appreciate if anybody know the answer. I was looking at EF site but there is no word about STE. Thank you.
1
vote
2 answers

Displaying list of self-tracking entities, filtering them by state

I want to display a list of self-tracking entities on the form, using standard binding mechanism. What I want is to select entites from list, change/add or remove them, then either submit changes or reject them depending on user choice. As far as I…
Srv19
  • 3,458
  • 6
  • 44
  • 75
1
vote
0 answers

WCF, Data-Updates & EntityReference object could not be serialized

I did a lot of stuff with WCF where I first thought: "Hmm, this problem is weird" - but after I figured each one out, it always made somehow sense (sometimes more, sometimes less). But now I'm at a point where I'm stuck and with all my imagination,…
Richard
  • 741
  • 2
  • 7
  • 17
1
vote
1 answer

Silverlight project seperated from WCF-service - How to acces database types

I have two solutions: 1 for my Silverlight app and 1 for my WCF service. Currently I have access to my entity types via a ADO.NET Self-Tracking Entity I created (it gives me a .tt file with all entities) but it fails every time I edit something in…
1
vote
1 answer

entity framework how to select only a few field or lazy loading with STE?

I am using entity framework and raw sql queries. I have a view, but in some cases I would like to get only a few fields, because one field is a filestream and it has a big size. However, when I use for example the following sql: select Name, Surname…
Álvaro García
  • 18,114
  • 30
  • 102
  • 193
1
vote
1 answer

Self-Tracking Entities with One to many relationship

I Use Self-Tracking Entities with WCF to Work With data and asp.net MVC3 As a client any idea why this code doesn't work in my MVC Controller i have this action to get User Contacts public ActionResult Contacts(int id) { …
Tarek Saied
  • 6,482
  • 20
  • 67
  • 111
1
vote
1 answer

EF4 ObjectStateManager not reporting changes?

I'm trying to implement a change auditing system at the context level using EF4 (database first). I'm overriding SaveChanges and capturing entities that have a state of Added, Deleted, or Modified from the context's ObjectStateManager. This normally…
1
vote
1 answer

Self Tracking Entities not returning modified object

I have the following function to update and insert a record in the table public DASInput UpdateDASInputTable(DASInput fileSetData, Guid programID) { string connectionString = GetConnectionString(programID); …
Sagar
  • 454
  • 10
  • 22
1
vote
1 answer

Self Tacking Entities - How to update navigation properties?

I'm developing an application using the EF w/ Self Tracking Entities. Because STE don't support Lazy Loading, what is the preferred method or best practice for development of updating navigation properties of an entity after making changes to the…
0
votes
2 answers

Selftracking Entities , attach only the entity itself without references

using : SQL Server 2008 R2, Entityframework 4.3.1 my scenario : I read my objects from the database on service side. I am using the T4 Template "Selftracking entities" to create objects from the objectcontext. Those objects are delivered to the…
0
votes
1 answer

Why model navigation is not working with Self-tracking entity?

I've generated data model(Entity framework) with foreign keys. It was data model generated from database. After that everything has worked, navigation and etc. Next I have generated a Self-Tracking entity. Unfortunately I lost navigation feature.…
nosbor
  • 2,826
  • 3
  • 39
  • 63