i was working in dotnet(function app)
public class AssetInfoModel{
public ImageModel image {get; set; }
public IllustrationModel illustration {get; set;}
public PublicationModel publication {get; set; }
public StoreCommunicationModel storecommunication{get; set;}
public MotionMediaModel motionMedia {get;set;}
}
this is my model and when i creates the object for the model AssetInfoModel assetInfo = new AssetInfoModel()
and assign value for a field for example : i assigned the value for image
,then the remaining fields takes the null values, but i need to avoid those fields having null(the assetInfo only need to have the field which not having null )
I appreciate any small help regarding this, guys
when i validate with newtonsoft schema validator i get image must be object not null
Dhanush S is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.