well.. if you really want the same behavior of session.Delete(string) then
the work to do is only an extension method as for instance:
public static void Delete<T>(this session, IQueriable<T> query)
{
Array.For(query.ToArray(), x=> session.Delete(x));
}


On Thu, Feb 10, 2011 at 5:21 AM, Glenn <[email protected]> wrote:

> @Fabio
> Yes, that is the code I'd like to create, but not manually. I have the
> expression and would like to automatically create the HQL required. Some
> more info: We're using LinqSpec for writing query specifications and would
> like to use the same specifications for deleting stuff. Basically do a
>   Delete(new PersonWithUsername("SKYWALKER"))
>
> The specifications return an expression, like "u => u.UserName ==
> "SKYWALKER";" This expression is what I'd like to have automatically
> converted into something I can delete with.
>
> @Stefan: Your hint seems like an interesting way to go. I'll have to look
> into that.
>
> Thanks to both of you for taking the time to reply!
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>



-- 
Fabio Maulo

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to