DLINQ Queries and observations

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following queries/Observations about DLINQ.

1. I could not find any direct way of handling many to many relations.
Suppose if User and Role are related by a join table UserRole then I should
be able to have a collection of Roles in User and vice versa. Which i think
is not possible in DLINQ. (Please correct me if I am wrong)

2. State management is handle outside entities. In scenareos where a client
grabs a entity from a WS , makes some changes and post it back to the ws for
updation, how is the DLINQ framework handle optimistic locking?

3. How do I provide optimizer hints in my DLINQ query? I have seen that thw
Query optimize taking wrong desicions white choosing join strategies and I
would like to override it.

4. I always felt the the VS WS proxy generator unnecessarily (re)defined the
custom entities in the generated proxy. I should be able to tell the VS to
use my definitions instead.
 
Chiranjib,

See inline.
1. I could not find any direct way of handling many to many relations.
Suppose if User and Role are related by a join table UserRole then I
should
be able to have a collection of Roles in User and vice versa. Which i
think
is not possible in DLINQ. (Please correct me if I am wrong)

That's not possible yet.. At best, the user could have a collection of
roles they are a member of, and the roles have a collection of users they
are a member of.

Remember, this is in it's initial stages. It will be a while before
this is released, so it's possible you will see it down the line (and you
will, if enough people make mention of it).
2. State management is handle outside entities. In scenareos where a
client
grabs a entity from a WS , makes some changes and post it back to the ws
for
updation, how is the DLINQ framework handle optimistic locking?

Over a WS, DLINQ isn't going to be able to do much here. You could use
DLINQ on the server side to return the data, but that's it. When you get it
back to update, you aren't going to be able to plug it back into the DLINQ
framework (at least as it stands now).
3. How do I provide optimizer hints in my DLINQ query? I have seen that
thw
Query optimize taking wrong desicions white choosing join strategies and I
would like to override it.

DLINQ doesn't offer that yet. It might come in the future (overloads of
the various methods), but honestly, I wouldn't hold my breath. If you have
a need for very specialized formation of your queries (which this would seem
to be, and one would ask why you don't use a SP in this case), then
traditional methods are better suited for you.
4. I always felt the the VS WS proxy generator unnecessarily (re)defined
the
custom entities in the generated proxy. I should be able to tell the VS to
use my definitions instead.

Interfaces are a good way to get around this. You can have your types
implement the same interface that you use. I believe that the serialization
story in the Windows Communications Foundation is better, so that you could
use your own type on the client side instead of one generated from WSDL.

Hope this helps.
 
Thanks Nicholas. It was helpful.
Regarding point 4. Interfaces dont help, since VS defines the entities in a
different NS . Hence I have to modify the code generated by the VS proxy
generator.

Painful task :-)
 
Chiranjib,

Interfaces can help here, because you can change the proxy generated by
the client and implement an interface in another namespace. I'm not saying
redefine the interface, use the same one, and it will work.
 
Back
Top