How to mark items as deleted not originally delete from database?
Define a new column of
type in your database for ever record in a table.
Bit field will hold either
. By default, set this flag value as
to indicate active and valid. Once you delete it from frontend, set this field to '
' to mark as deleted.
Now, during data retrieval from DB, use this field as one of the WHERE clause condition, ex:
-- IsDelete is the BIT field defined
SELECT * FROM myTable WHERE IsDelete = false