Re: Linq; expression parser?
- From: "Frans Bouma [C# MVP]" <perseus.usenetNOSPAM@xxxxxxxxx>
- Date: Wed, 30 May 2007 07:57:55 -0700
Marc Gravell wrote:
That's IMHO a bad way of doing SOA.
Yes - I did say it was "off the cuff"... but I'm still of the opinion
that string-based runtime queries still have a role to play in
some scenarios. It shouldn't be the default, but there seems
to be enough interest to at least not preclude it.
the only reason I heard in the past years which makes some sense (not
much, but some) is that a string based query language often looks
similar to SQL.
You need a typed, compile time checked query language which,
if an error is specified, breaks at compile time so you can fix
it before you ship it to the customer ;)
In a perfect world, yes. But inevitably some things can't be known
at compile-time. It happens.
I haven't ran into these situations where you couldn't construct the
object based query at runtime and had to revert to stored strings.
Marc, you're still using EXEC sp_executeSQL "query" ? ;)
A bit OT, but if I had the need to write dynamic SQL inside the
database (not from C#), then yes: sp_executeSQL on a
parameterised nvarchar query would be the correct solution.
But equally - yes, sometimes it is necessary to build up an SQL
query manually (parameterised of course), beyond what most ORMs
will offer (e.g. a current project involves a fully-temporal database
implementation; I've not had much luck using ORM in such
scenarios - perhaps yours is better the others, I don't know).
OR-mappers (including D-LINQ) aren't the only code that can
write SQL.
Oh, that's true. However reverting to plain SQL is often a maintenance
burden, but if it's unavoidable, it happens of course. Though I'd first
look into Views and after that SQL strings created in code which should
use the o/r core. What exactly do you mean with fully temporal database?
FB
--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
.
- Follow-Ups:
- Re: Linq; expression parser?
- From: Marc Gravell
- Re: Linq; expression parser?
- References:
- Linq; expression parser?
- From: Marc Gravell
- Re: Linq; expression parser?
- From: Frans Bouma [C# MVP]
- Re: Linq; expression parser?
- From: Jon Skeet [C# MVP]
- Re: Linq; expression parser?
- From: Marc Gravell
- Re: Linq; expression parser?
- From: Frans Bouma [C# MVP]
- Re: Linq; expression parser?
- From: Marc Gravell
- Re: Linq; expression parser?
- From: Frans Bouma [C# MVP]
- Re: Linq; expression parser?
- From: Barry Kelly
- Re: Linq; expression parser?
- From: Frans Bouma [C# MVP]
- Re: Linq; expression parser?
- From: Marc Gravell
- Re: Linq; expression parser?
- From: Frans Bouma [C# MVP]
- Re: Linq; expression parser?
- From: Marc Gravell
- Linq; expression parser?
- Prev by Date: Re: Conceptual - Communication between Objects
- Next by Date: Re: how to test a string if it contains special characters
- Previous by thread: Re: Linq; expression parser?
- Next by thread: Re: Linq; expression parser?
- Index(es):
Relevant Pages
|