473,239 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,239 software developers and data experts.

Re: Associations in DLinq Select() extension method

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
Jun 27 '08 #1
9 1661
Marc,
Write it the way that you know works... (i.e. the one you commented out),
Columns can be specified by user at runtime. So I cannot hard-code them into
code.
I can try to create separate assembly containing this query at runtime and
compile it dynamically.
Is this reasonable ?
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...
I'm unable to implement it using reflection: I do'nt have enough deep
knowledge about expression tree.

Where to find GetProperty() method which accepts dotted notation and
traveres through object tree ?
Such method should be very useful in may cases. Is this present in .NET
framework ?
Is it possible to use MS Dynamic Linq Library Expression
evaluator for this ?

Andrus.
Jun 27 '08 #2
I'm unable to implement it using reflection: I do'nt have enough deep
knowledge about expression tree
Depending on your urgency, I might be able to look at this, but it won't
be "now"...
Where to find GetProperty() method which accepts dotted notation and
traveres through object tree ?
Such method should be very useful in may cases. Is this present in .NET
framework ?
Well, the binding code does something like this, but not in a way that
would be easy to use...
Is it possible to use MS Dynamic Linq Library Expression
evaluator for this ?
I have no idea.
Jun 27 '08 #3
Marc,
>I'm unable to implement it using reflection: I do'nt have enough deep
knowledge about expression tree
Depending on your urgency, I might be able to look at this, but it won't
be "now"...
If you have some time in future it would be very useful.
Maybe it would be useful to add this function to MiscUtil library.

Andrus.
Jun 27 '08 #4
On Apr 28, 12:21 pm, "Andrus" <kobrule...@hot.eewrote:
I'm unable to implement it using reflection: I do'nt have enough deep
knowledge about expression tree
Depending on your urgency, I might be able to look at this, but it won't
be "now"...

If you have some time in future it would be very useful.
Maybe it would be useful to add this function to MiscUtil library.
I don't think so. I see this as part of what the LINQ provider should
be doing for you. Again, it looks like DLinq isn't really ready for
everything you want it to do.

Jon
Jun 27 '08 #5
I don't think so.

I strongly agree; this is not a MiscUtil thing - and besides, Jon owns
that, not me - I just happened to contribute a small part...

But the fact remains, you seem to have a rather unique take on what LINQ
should do... and if it can't do it, you try to do it anyway (or you try
to get others?me? to)... from a support perspective, that is never a
good idea.

Marc
Jun 27 '08 #6
OK; I've had a few moments to think, and I've reached un unavoidable
conclusion. From "day dot", people (myself and many others) have
repeatedly told you that your design works in an unorhadox manner, that
wasn't really directly suited to LINQ. And warned that at each stage you
were going to hit problems.

Well, sure enough; at each stage, you've hit problems; and perhaps
foolishly I've assisted with each successive issue because *considered
individually* it was only a small problem, that could be worked around.

Well; putting a while series of little problems one after the other is
just an endless cycle.

I don't mean to be obstructive, but I have to draw the line eventually;
I'm not simply here to unpick this one system, and there are better
things (for myself, my company, and the community) that I could do with
my time.

So: sorry, but I won't be looking at "supporting dots" in property
lookups. I hope you understand; it isn't personal.

But any more general C# / .NET etc questions, and I'm all ears.

Marc
Jun 27 '08 #7
Jon,
I don't think so. I see this as part of what the LINQ provider should
be doing for you.
LINQ provider should consume expression trees, not to create it.
So I still think this should be task of dynamic generic linq library which
can
then used with any provider.

MS Dynamic Linq Library return non-generic IQueryable.

We need dynamic linq library which returns generic IQueryable<TAnonymuous>
types like compiler generated code does for anonymuous types statically.
Again, it looks like DLinq isn't really ready for
everything you want it to do.
DLinq ( = DataBase LINQ) is used as common denominator to refer all linq
providers which allow to retrieve database data.
I have seen such usage in MS blogs.

If we need to refer to specific provider, we can use this provider name like
DbLinq, Ling-SQL
etc.

Andrus.

Jun 27 '08 #8
DLinq ( = DataBase LINQ) is used as common denominator to refer all linq
providers which allow to retrieve database data.
When I see DLinq, I read "LINQ to SQL"; which is why it sometimes get
especially confusing when talking about DLinq (one of the MS
offerings) and DbLinq (one of the alternatives).

By the way, MS are apparently investigating the "connect" issue with
the cache. I'll keep you posted of any updates.

Marc
Jun 27 '08 #9
Andrus <ko********@hot.eewrote:
I don't think so. I see this as part of what the LINQ provider should
be doing for you.

LINQ provider should consume expression trees, not to create it.
But the C# compiler is already creating an expression tree, isn't it?
Maybe I've missed something about what you're trying to do in the first
place...
So I still think this should be task of dynamic generic linq library which
can then used with any provider.

MS Dynamic Linq Library return non-generic IQueryable.

We need dynamic linq library which returns generic IQueryable<TAnonymuous>
types like compiler generated code does for anonymuous types statically.
Again, it looks like DLinq isn't really ready for
everything you want it to do.

DLinq ( = DataBase LINQ) is used as common denominator to refer all linq
providers which allow to retrieve database data.
Not in my experience. I understand DLinq as another name for LINQ to
SQL - although I misread the subject of your post as DbLinq rather than
DLinq, which doesn't help things.
I have seen such usage in MS blogs.

If we need to refer to specific provider, we can use this provider name like
DbLinq, Ling-SQL
etc.
And does LINQ to SQL not handle this case?

--
Jon Skeet - <sk***@pobox.com>
Web site: http://www.pobox.com/~skeet
Blog: http://www.msmvps.com/jon.skeet
C# in Depth: http://csharpindepth.com
Jun 27 '08 #10

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

Similar topics

4
by: David Allison | last post by:
I am looking to open my MDE Application using the DB files associated with the application I have created. My application is using a non descript three digit extension that is related to the...
7
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 ==...
3
by: Chiranjib | last post by:
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...
0
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...
0
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:...
11
by: Andrus | last post by:
I created dynamic extension methods for <= and < SQL comparison operators: public static IQueryable<TLessThanOrEqual<T>(this IQueryable<Tsource, string property, object value); public static...
1
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...
2
by: Andrus | last post by:
I need to pass DLinq query to RDLDEsigner. RDLDesigner does not accept IQueryable<T>. It accepts SQL select statement in plain text format as data source. How to get SELECT statement which...
2
Nepomuk
by: Nepomuk | last post by:
Recently, I found that I had associated a file type to notepad by mistake. This file type (let's just say, it has the extension .xyz) wasn't supposed to be opened by notepad - actually, it wasn't...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

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.