Is it possible to have a non-public parameterless constructor that can be used for model binding?
问题 I have a following POCO class. I don not want the parameterless constructor to be public. public class FileDownloadRequest { //public FileDownloadRequest() { } public FileDownloadRequest(int fileId, RepositoryFolderTypes fileType) //RepositoryFolderTypes is an enum, not a class { this.FileId = fileId; this.FileType = fileType; } public int FileId { get; set; } public RepositoryFolderTypes FileType { get; set; } //an enum } When I am trying a https://10.27.8.6/Files/DownloadFile?fileId=1