我被卡住了。 我传递一个简单的json对象,它工作正常。但我让它变得更复杂一些。在这种情况下,我的消息对象中的fileInfo对象我遇到了麻烦。收到文件信息时为空。我知道我必须忽略一些简单的事情。这是我传递的json对象的示例。
提前致谢。
public class ContactUsInformation
{
public string name { get; set; }
public string company { get; set; }
public string email { get; set; }
public string phone { get; set; }
public string description { get; set; }
public IList<AttachmentInfo> fileInfo{ get; set; }
//public AttachmentInfo[] fileInfo { get; set; }
/*public string[] fileName { get; set; }
public string[] fileType{ get; set; }
public string[] fileValue { get; set; }*/
}
public class AttachmentInfo{
public string fileName { get; set; }
public string fileType { get; set; }
public string fileValue { get; set; }
}
public IEnumerable Contact([FromBody] ContactUsInformation [] contactUsInformation)