Adding comments using external database transactions

The comments list feature could be added to the system by performing the following steps:

  1. Inject the IConfigurationRoot from the Startup file.
  2. Add Execute methods in the ICommentRepository interface. 
  3. Add Execute methods in the CommentRepository concrete type.

 

  1. Create a query object interface, ICreateCommentCommand.
  2. Create a concrete query object, CreateCommentCommand.
  3. Inject ICommentRepository and IConfigurationRoot in the comments controller.
  4. Create a View model, CommentViewModel.
  5. Create an action to add comments anonymously, CreatePostComment(), to a blog post.
  6. Create an action to display or add comments to the View component anonymously, GetCommentsListViewComponent().
  7. Create a ...

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.