473,779 Members | 1,913 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DLINQ Queries and observations

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.
Nov 17 '05 #1
3 1717
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.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
Nov 17 '05 #2
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 :-)

"Nicholas Paldino [.NET/C# MVP]" wrote:
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.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

Nov 17 '05 #3
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Chiranjib" <Ch*******@disc ussions.microso ft.com> wrote in message
news:74******** *************** ***********@mic rosoft.com...
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 :-)

"Nicholas Paldino [.NET/C# MVP]" wrote:
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.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
1868
by: Senna | last post by:
Hi Have a question about DLinq. The example code floating around looks like this: Northwind db = new Northwind(@"C:\...\northwnd.mdf"); var custs = from c in db.Customers where c.City == "London" select c; How does this work. Will it retreive all the rows from the Customer table
0
1233
by: Scott Nonnenberg [MSFT] | last post by:
This is our first official DLinq chat. We're still early in the planning and development stage for this very cool technology, so we can react to your feedback much more easily. Show up and tell us what's on your mind! Scott Nonnenberg Program Manager Visual C# Team DLinq "The LINQ Project is a codename for a set of extensions to the .NET
0
1106
by: Scott Nonnenberg [MSFT] | last post by:
The DLinq team will be ready and waiting for your questions and comments at this date and time at this location: http://msdn.microsoft.com/chats/chatroom.aspx. This is otherwise known as a chat - a great opportunity to speak directly with the people who develop the software you might just end up using! See you there! Scott Nonnenberg Program Manager Visual C# Team
0
1167
by: Scott Nonnenberg [MSFT] | last post by:
Show up and talk to members of the DLinq team. What's DLinq, you ask? Well, to understand that you'll need to know what LINQ is - you can start with the blurb below, read more about it here: http://msdn.microsoft.com/data/linq/, and install the latest CTP: http://www.microsoft.com/downloads/details.aspx?familyid=1e902c21-340c-4d13-9f04-70eb5e3dceea&displaylang=en It's very cool stuff. Scott Nonnenberg Program Manager
4
1459
by: Brett Romero | last post by:
I've downloaded the DLINQ samples from Microsoft and have always been able to compile these in VS.NET 2005 Pro. I have a new project that I added DLINQ references to and put in a simlpe query. It didn't compile. I went back to the SampleQueries.sln, compiled and for the first time it failed. It keeps looking at the query code as if it were regular c#. It's wanting ";", which the queries don't use. Same thing is occuring in my other...
19
1529
by: Andrus | last post by:
I need to repeatedly execute same queries which returns single entity by id, like: Customer cust = (from c in db.Customers where c.CustomerID=="AIRBU" select c).SingleOrDefault(); DLinq holds tracked object list internally so customer "AIRBU" exists in memory.
9
1688
by: Marc Gravell | last post by:
How to fix ? Write it the way that you know works... (i.e. the one you commented out), or write that parses the input string doing a Split on '.', and uses reflection to navigate the child hierarchy. Which isn't something I have time to do right now... Marc
1
2187
by: Michel Walsh | last post by:
In the same spirit, but more LINQ related, you can also use ExecuteQuery: var query = dataContext.ExecuteQuery<className>( @"SELECT ... WHERE ... AND... OR... "); where className is appropriate to recuperate the result of your dynamically built SQL statement, as a string.
0
2456
by: Andrus | last post by:
I implemented cached DLinq ExecuteQuery method. However some queries are run against database always because keys are not found in cache. Maybe equality comparer or other parts of implementation are wrong and/or inefficient. How to fix this code ? Which is best way to create static ExecuteQuery method which caches all queries during
0
9474
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10306
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9930
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7485
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6724
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3632
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2869
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.