...

/

Removing Unnecessary Request Fields from Posting an Answer

Removing Unnecessary Request Fields from Posting an Answer

Learn to improve efficiency by removing unnecessary request fields in answer posting.

Steps to remove unnecessary request fields

Let’s tighten up posting an answer:

  1. In the models folder, create a new model called AnswerPostFullRequest as follows:

Press + to interact
public class AnswerPostFullRequest
{
public int QuestionId { get; set; }
public string Content { get; set; }
public string UserId { get; set; }
public string UserName { get; set; }
public DateTime Created { get; set; }
}

This contains all the properties that are needed by ...