Y
Yash Ganthe
Hi,
I only have the ID of the object to be deleted. I want to issue an
UPDATE stmt on the DB so that the is_deleted field in the object gets
marked as true, thereby soft-deleting the object. I could do :
c = context.Customers.Where(Customer => Customer.id==123) ;
context.Attach(c) ;
c.is_deleted = true ;
context.SaveChanges() ;
But this would mean firing a SELECT stmt and then an UPDATE that
updates ALL the columns.
What I would like to do is fire an UPDATE on a single column.
I use .NET 3.5 sp1.
Regards,
Yash
I only have the ID of the object to be deleted. I want to issue an
UPDATE stmt on the DB so that the is_deleted field in the object gets
marked as true, thereby soft-deleting the object. I could do :
c = context.Customers.Where(Customer => Customer.id==123) ;
context.Attach(c) ;
c.is_deleted = true ;
context.SaveChanges() ;
But this would mean firing a SELECT stmt and then an UPDATE that
updates ALL the columns.
What I would like to do is fire an UPDATE on a single column.
I use .NET 3.5 sp1.
Regards,
Yash