The Model:
public class ErrorMessage
{
public string StatusCode { get; set; } = "400";
public List<string> Message { get; set; }
}
I initialized the model here. When it goes to add the string to it there is always a null exception/reference error. I'm completely doing this wrong?
ErrorMessage errorMessage = new ErrorMessage();
errorMessage.Message.Add("The transaction could not be processed");