locked
Re-using the same EDM on client and server RRS feed

  • Question

  • For projects that devote substantial time and energy encapsulating business logic in their EDM, will there be a way to deploy the same EDM with client applications and use it with the ADO.NET Data Services client?

    I understand that the standard pattern is to generate a proxy that reproduces the same data contract, thus creating identical-looking entity classes, but haven't you then lost all of the business logic on the client end if you use those auto generated types rather than the original EDM?  I thought the whole point of the Entity Framework and EDM was to create the model once and use it everywhere.

    Paul Schofield
    Wednesday, October 29, 2008 10:28 PM

Answers

All replies

  • You might want to read the post "Possible to reuse types?" on this page.


    Regards,
    Koen
    Friday, October 31, 2008 8:52 AM
  • Thanks, so much, that is exactly what I was looking for!  Glad to learn that ADO.NET Data Service supports this model.

    Now that I'm using the DataServiceContext class, I'm discovering that there are some limitations in the type of LINQ to Entities queries that can be expressed through an ADO.NET Data Service, namely that you can't filter on more than one type of entity in a query.  I'm hoping to find some guidelines/workarounds for writing LINQ to Entities queries against the DataServiceContext, but most examples seem to use the generated proxies.

    Has anyone discovered any useful documentation on writing LINQ to Entities queries against the DataServiceContext?

    Regards,
    Paul Schofield
    Tuesday, November 4, 2008 6:23 PM
  • I started to put together a query sheet here.  Let me know other queries needed.  hth

    http://staceyw.spaces.live.com/blog/cns!F4A38E96E598161E!1420.entry

    Tuesday, November 4, 2008 7:04 PM