N Tiers with SubSonic 3, Dirty Columns collection is alwayes empty on update

Posted by Adel on Stack Overflow See other posts from Stack Overflow or by Adel
Published on 2009-07-16T14:41:19Z Indexed on 2010/05/28 9:51 UTC
Read the original article Hit count: 231

Filed under:
|
|

Hello guys

here is what i am doing, and not working for me.

I have a DAL generated with SubSonic 3 ActiveRecord template, i have a service layer (business layer if you well) that have mixture of facade and some validation.

say i have a method on the Service layer like public void UpdateClient(Client client); in my GUI i create a Client object fill it with some data with ID and pass it to the service method and this never worked, the dirty columns collection (that track which columns are altered in order to use more efficant update statment) is alwayes empty.

if i tried to get the object from database inside my GUI then pass it to the service method it's not working either.

the only scenario i find working is if i query the object from the database and call Update() on the same context all inside my GUI and this defeats the whole service layer i've created.

however for insert and delete everything working fine, i wonder if this have to do something with object tracking but what i know is SubSonic don't do that.

please advice. thanks. Adel.

© Stack Overflow or respective owner

Related posts about subsonic

Related posts about subsonic3