Leveraging default transaction behavior

We will be witnessing the default behavior of EF transactions in this section; let's continue in adding support to tags and see how transactions get involved on their own.

The changes required in the individual Post Add/Edit view are listed as follows:

  • Tags: This tag information is a filtered list of tags associated with the Post
  • TagIds: This tag information is a list of filtered tag IDs
  • TagNames: This tag information is the filtered tag names in a comma-separated string

Let's incorporate the code required to expose the filtered tag list, tag ID list, and tag names flattened to a string in the  GetPostByIdQuery object. These values will enable us to pre-select the tags while adding/editing Post:

Get Mastering Entity Framework Core 2.0 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.