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
0
votes
1 answer

Different EF Property DataType than Storage Layer Possible?

I am putting together a WCF Data Service for PatientEntities using Entity Framework. My solution needs to address these requirements: Property DateOfBirth of entity Patient is stored in SQL Server as string. It would be ideal if the entity class…
0
votes
2 answers

Breeze: Track changes on new object

I am able to create an entity object, set some default values and add it to the manager. Now I want to track the changes to it using manager.hasChanges(). For some reason, this always returns true. Should I be checking something else too when…
jpo
  • 3,959
  • 20
  • 59
  • 102
0
votes
0 answers

Using Entity Framework in a clustered enviroment (accessed remotely)

I'm defining a 3-tier architecture for a web application. Due to high availibility requirements, i have defined to deploy the business layer (BL) and the data access layer (DAL) in a cluster of two nodes, and the presentacion layer (PL) in two…
0
votes
2 answers

Difference between Entity framework self tracking entities vs Unit of work

What is the difference between using Entity framework self tracking entities and implementing Unit of work architecture? As i understand both are keep tracking of the objects, one db call for commit changes. So i cant figure out the difference of…
0
votes
1 answer

EF4.x STE: Entity State not changed if SubItem is changed

I create a client-server application in VB.NET 2010 with EF 4.x STEs. If i change the Entity the State is setting correct. But I if I change a sub-item, then the Entity-State is not changed - only of the SubItem. How I must modified the tt-Templates…
0
votes
1 answer

Attaching to context and keeping the entities objectstate

I'm working with Self tracking entities. and when i Attach an entity to the context, all the entities related to it and the entity itself gets added in an added state in the context objectstatemanager. where as in the entity itself they have a…
Nick V
  • 687
  • 7
  • 21
0
votes
1 answer

I cant add an item to a Self Tracking Entity Collection with Navigation Properties

I have a WPF 4 application where my data is accessed through Self Tracking Entities(STE 5). I have a WPF content control with its data-context set to a model class (vendor) of the STE. The vendor class has a navigation property of vendor_accounts.…
J King
  • 4,108
  • 10
  • 53
  • 103
0
votes
1 answer

Linq to Entities used with STE generate graphs with duplicates

I have a strange problem with Linq to Entities sometimes generating graphs with duplicates. A query, using includes, with a simple restriction at the base of the graph requested does not generate duplicates. When the same query is used with another…
0
votes
1 answer

entity framework 4.0 with STEs: how to delete a many to may relationship without delete registers

I have a many to many relationships in my dataBase, so I have three tables, TableA, TableB and TableAB. TableAB only has the primary key of the tableA and the primary key of the tableB. When I create my edmx from the data base, I don't have the…
Álvaro García
  • 18,114
  • 30
  • 102
  • 193
0
votes
2 answers

C# dynamic type how to access some methods and slef tracking entities

I have use the type dynamic, a new type in .NET 4.0. I want to use a dynamic type because I want to use some types that in advance I don't know what type is, but I know that all this possible type has some common methods. In my case, I am using self…
Álvaro García
  • 18,114
  • 30
  • 102
  • 193
0
votes
1 answer

EF 4.0 error of two entities with the same key with self tracking entities

I have two tables in which I save the relationship between persons. I want the hierarchy, so my two tables…
Álvaro García
  • 18,114
  • 30
  • 102
  • 193
0
votes
1 answer

Self Tracking Entities and lack of Entity Inheritence

My trivial EDMX has a base entity along with two entities that inherit from it... <>-------- UserEntity EntityBase <>-------- CustomEntity ...this automatically creates three ObjectSet properties on the generated…
Phil Wright
  • 22,580
  • 14
  • 83
  • 137
0
votes
1 answer

STE Update & Delete struggle in an N-TIER application

We've been building an application which has 2 parts. Server Side: A WCF service, Client Side: A WPF app following MVVM patterns So we also use Self Tracking Entities to get some database job done but we're having struggles. Here's an example…
Selçuk
  • 176
  • 1
  • 10
0
votes
1 answer

Explicitly load related entities in many-to-many relationship with Entity Framework over WCF

I'm using EF 4.1 with Self-Tracking Entities in a layered application which uses WCF to hand entities back and forth from the client to the server. A portion of my database contains 3 tables: Customer Contact CustomerContacts CustomerContacts…
Erikest
  • 4,997
  • 2
  • 25
  • 37
0
votes
1 answer

Self Tracking entities and the mysterious ChangeTracker_ChangeTrackingEnabled datatable column

I'm using Self Tracking Entities that implements IObjectWithChangeTracker with the last Entity Framework RC available as a Nuget. The target database is PostgreSQL. I'm also using Code First fluent API to construct the model and LINQ to Entity for…
1 2 3
11
12