ADO.NET Data Services Hooking POC V3 .1

I just finished implementing the IUpdatable interface[:)]


With ADO.NET Data Services, in the client part, you can use some LINQ queries which will be translated to an url. It’s really great to be able to use LINQ. However, this query is restrictive. For example, extension methods defined in the Queryable class aren’t allowed with ADO.NET Data Services (NotSupportedException).


When you add a web reference to your service, you will have some entity classes generated from the service metadata. If you have a relationship defined with a List<T>, or IEnumerable<T>, etc., in the server, the client generated code will use a System.Collections.ObjectModel.Collection. This class has a Count property. But when you want to use this on a LINQ query, you have a DataServiceQueryException. My ADO.NET Data Services Hooking POC solves it. [:)]

This entry was posted in 7671, 7674, 8975, 9060. Bookmark the permalink.

6 Responses to ADO.NET Data Services Hooking POC V3 .1

  1. Matthieu,

    The current v3.1 CodePlex download appears to be a T-SQL script, not source code for an IUpdatable implementation.

    –rj

  2. Matthieu MEZIL says:

    Hi roger,
    You’re right. In fact, I just posted the DB generation script in the release because I think the interested part is the source code. I just added the dll in the release anyway.
    Matthieu

  3. Martintr says:

    Hi Matthieu

    The initail test are still going on but i have not seen a way to insert a new object at this point.

    I have tried creating a new object and adding to the context.
    It returns a created to the service but nothing goes any further.

    Have you got a test for Insert new object.

    Just wondering if you have tried this yet?

    Thanks
    Martintr

  4. Matthieu MEZIL says:

    Hi Martin. I am very surprised by your message.
    I create a Winform application which do this without problem.

    var em = new Employee { Id = Guid.NewGuid(), LastName = “LN”, Since = DateTime.Now };
    _context.AddToEmployees(em);
    _context.SaveChanges();

  5. I should say that msmvps.com has lots of interesting information. Looks like the author did a good job. I will be coming back to msmvps.com for new information. Thank you.

  6. msmvps.com is very informative. The article is very professionally written. I enjoy reading msmvps.com every day.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>