Hello, pvginkel!

Thanks for your interest! I have looked at your code, and in it you are 
deleting every entity manually, that is, not issuing a DELETE statement:

foreach (var record in self)
            {
                session.Delete(record);
            }


Is this just the preliminary version?

Thanks,

RP


On Monday, April 23, 2012 7:32:04 AM UTC+1, pvginkel wrote:
>
> This is simple enough to implement through extension methods. It probably 
> wouldn't even have to be part of NHibernate core but could easily be 
> provided through an add-on library.
>
> I've implemented a proof of concept in  
> https://github.com/pvginkel/nhibernate-core-testcase. This project has a 
> file named MutationExtensionMethods.cs in the Mutation directory which 
> provides the mutation functionality through extension methods. This is a 
> very rough implementation (the update currently only works on properties 
> and goes through reflection).
>
> Maybe I'll pick this up.
>
> On Sunday, April 22, 2012 11:44:46 AM UTC+2, Ricardo Peres wrote:
>>
>> Hi!
>>
>> Sorry for getting in the middle of your discussion... just wanted to ask 
>> one thing: some guys implemented strongly typed update and delete 
>> operations on top of LINQ for Entity Framework (
>> https://github.com/loresoft/EntityFramework.Extended).
>> For example:
>>
>> //delete all users where FirstName matches
>> context.Users.Delete(u => u.FirstName == "firstname");
>>
>> //update all tasks with status of 1 to status of 2
>> context.Tasks.Update(
>>     t => t.StatusId == 1, 
>>     t2 => new Task {StatusId = 2});
>>
>> //example of using an IQueryable as the filter for the update
>> var users = context.Users.Where(u => u.FirstName == "firstname");
>> context.Users.Update(users, u => new User {FirstName = "newfirstname"});
>>
>> Do you think this would be something interesting for NHibernate?
>>
>> Thanks,
>>
>> RP
>>
>>
>> On Saturday, April 21, 2012 8:00:38 PM UTC+1, Oskar Berggren wrote:
>>>
>>> So what do we do now that NH 3.3.0GA is released? 
>>>
>>> There are already several interesting pull requests lined up, some of 
>>> which are new features. I propose that the next planned version will 
>>> be 3.4.0. 
>>>
>>>
>>> What about possible as yet undetected regressions in NH 3.3.0GA? Do 
>>> you think it would be a good idea to hold of merging to the master 
>>> branch for a week or so in case any important regressions pops up and 
>>> we want to do a 3.3.1? One can do this from a branch of course, but 
>>> without the assistance of the excellent build server. 
>>>
>>>
>>> /Oskar 
>>>
>>

Reply via email to