1

Is there any way to share self tracking entities with client tier(from server tier which is WCF) like Data Contract.
I mean, do not include any assembly with STE to client, just get them from server e.g.

If "DAL" is the service reference, I want some like:

DAL.SomeEntity = new DAL.SomeEntity();
Jason Aller
  • 3,541
  • 28
  • 38
  • 38
ard
  • 13
  • 2

1 Answers1

0

Self tracking entities must be shared with client in form of code or assembly. That is the main requirement to use them because they are not just a contract they also contain logic responsible for change tracking and this logic cannot be shared with the client in any other form.

Ladislav Mrnka
  • 360,892
  • 59
  • 660
  • 670
  • Thanks! So i need to use DTO or POCO. – ard Jan 15 '12 at 20:59
  • If you use DTO or POCO why did you use STEs? Their purpose is to only for scenarios where they are transferred to client. – Ladislav Mrnka Jan 15 '12 at 21:11
  • The purpose of STEs was get lover DataBase load. As I understad while we calling e.g. context.DeleteObject(someobj) it`s executing only DELETE query, finding id object by key. In case of POCO i need to select proper object from context, and then delete it, so it`s two querys SELECT & DELETE. – ard Jan 16 '12 at 03:53