This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
How about an auto save changes when querying for data? Let's say i've deleted some rows and now calling Count method.
long preCount = unitOfWork.Count(); Item item = unitOfWork.FindOne(query); unitOfWork.Remove(item); long postCount = unitOfWork.Count(); In the code above postCount and preCount are equal. In order to make it right i have to make two calls to database. Is there any way to make it a one call? In my system i lose most of the time due to ping time so it's crucial to make as little calls as possible. |
|
|
[quote user="Erxar"]Is there any way to make it a one call?[/quote] The only way I can think of is with a stored procedure with an OUT parameter. We don't currently support stored procs and even if we did I don't think we would support this behaviour - It's too ad hoc for most O/RMs I suspect. Cheers, Andrew. |
|