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
|
Hi All, How can I delete multiple record through lightspeed, I am able to delete single record but for deleteting multiple records i have to write my code in loop. is it possible to delete multiple record. |
|
|
You can do a bulk delete using IUnitOfWork.Remove(Query) (followed by SaveChanges), where Query is a query that specifies the records you want to delete. Note however that this bypasses the identity map and hits the database directly, so it can result in loaded objects remaining even though the underlying database record has been deleted. Therefore, you should almost always dispose or reset the unit of work after committing a "remove by query" (and similarly for "update by query"). |
|