In this chapter, I will cover how to delete data using Entity Framework Core 5. There are generally two ways to delete a record. These two methods are often referred to as soft delete and hard delete. A soft delete is flagging a record as deleted and can be achieved by doing a database update and setting a flag to mark a record as deleted. A hard delete is removing the record from the database, and it can no longer be retrieved afterward. In this chapter, I will be covering how to implement a hard delete.
10. Deleting Data
Get Beginning Entity Framework Core 5: From Novice to Professional now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.