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

EF self tracking Silverlight WCf

Hi I have a silverlight4 + .net 4.0 application where i am using self tracking entities. In the application i have a silverlight project which contains the entities generated by EF self tracking template. This project is being shared by the wcf…
0
votes
2 answers

Can a Entity Framework Trackable collection be bound to an ASP.Net Gridview?

I've got a GridView on a ASP.Net page. I would like to set the DataSource of the Gridview to a trackable collection of Entity Framework objects. I though the code should look like this: this.gvMyGridView.DataSource = entity.MyDetailedItems; …
epotter
  • 7,631
  • 7
  • 63
  • 88
0
votes
2 answers

How to save collection into entity properly?

I have some object with EntityCollection inside. If I just add the new entity everything works good. The code that does it here: Context.ApplyChanges() Context.SaveChanges() But if I try to update the entity I have the following message:…
mimic
  • 4,897
  • 7
  • 54
  • 93
0
votes
1 answer

How do I correctly use EF4 Navigation Properties?

I've created a database using the EF4 model-first approach. In my model, there's an N-to-M relationship between two entities: I've filled my database with some dummy data, including 3 records of type Diagnosis and 3 records of type TreatmentSchema…
0
votes
2 answers

EF4 Self Tracking Entities

I am currently trying to use STE's in an n-tier scenario. I have a WCF service that allows me to retrieve a graph of objects and/or update objects along with a client (WPF) application that allows me to edit aspects of that graph and submit the…
0
votes
1 answer

Is there any way to know if EF4 is currently in the processes of hydrating an Self Tracking Entity (STE)

I have the need to perform some custom logic in my EF 4 STE public getters and setters. However, I only want this custom logic to execute if EF is not currently hydrating an entity. Are there any built in flags, statuses or object states that can…
Nate Jackson
  • 549
  • 4
  • 15
0
votes
1 answer

EF4: using Add Service Reference causes issues with STE(self tracking entities) not remember there changes?

I found an issue but it refers to the BETA version of VS 2010. I am interested in knowing if this issue has been fixed in RTM? Basically it states (saw it via EF 4 Self Tracking Entities does not work as expected ) Make certain to reuse…
Martin
  • 23,844
  • 55
  • 201
  • 327
0
votes
2 answers

EF4 + STE: Reattaching via a WCF Service? Using a new objectcontext each and every time?

I am planning to use WCF (not ria) in conjunction with Entity Framework 4 and STE (Self tracking entitites). If I understand this correctly my WCF should return an entity or collection of entities (using LIST for example and not IQueryable) to the…
Martin
  • 23,844
  • 55
  • 201
  • 327
0
votes
2 answers

Use of Self-Tracking Entities in ASP.NET across multiple Posts

I have a simple requirement (so I thought...!) I have a model that consists of Order, OrderLine, Product. I want to create an Order and add OrderLines (each OrderLine related to a Product). I create the Order and add new OrderLines to it. Between…
0
votes
1 answer

Self-Tracking Entity Sets and loading realated entites with include problem

I have a problem with .include method of Self-Tracking Entity. My table called documents have relations to tables States, Companies, Workers and Departments. I want to load all documents with this related data. Im tring do this like…
Pax0r
  • 2,324
  • 2
  • 31
  • 49
0
votes
1 answer

Deserializing self-tracking entity with nested TrackableCollection

How can I deserialize JSON string into entity of type like this (self-tracking properties removed to be simple): public class User: { int Id { get; set; } string Name { get; set; } public TrackableCollection Roles { get; set; } //…
Alexey Solonets
  • 817
  • 6
  • 15
0
votes
1 answer

Problems binding Self-Tracking Entity's Navigation Property WPF

I have a WPF application consuming data using Entity Framework 4 and Self-Tracking Entities. In which I have a window with 2 controls in it, one that shows the "Details" portion of an object using a ContentControl and templates from a merged…
Nick Daniels
  • 922
  • 8
  • 13
0
votes
2 answers

How to create and store a (self-tracking) entity object on the server side?

I am trying to achieve the following using Entity framework 4.0 and self-tracking entities: 1) The client application request a book form the server by providing an ISBN number 2) The server performs a query on its database to see if the book is…
Peter
  • 11
  • 1
  • 2
0
votes
1 answer

Self tracking entities return Unchanged in my WCF service

I've set up a little n-tier web application using MVP (Model View Presenter) in the front-end, a WCF service on the backend, which communicates with the BLL an behind that the DAL, which communicates with the EF4.0. This is all working quite nicely,…
Jan_V
  • 4,244
  • 1
  • 40
  • 64
0
votes
2 answers

EF4, self tracking, repository pattern, SQL Server 2008 AND SQL Server Compact

I am creating a project using Entity Frameworks 4 and self tracking entities. I want to be able to either get the data from a sql server 2008 database or from sql server compact database (with the switch being in the config file). I am using the…