The UICorp is just a class with properties (all value type) like string, int, decimal, enum, DateTime…..
I really have no idea why it gives null exception here.
public class UICorp
{
public long ID { get; set; }
public string Name { get; set; } = null!;
public string? RegNo { get; set; }
public string? RegNoNew { get; set; }
public DateTime? RegDate { get; set; }
[NoUpdate] public string RefID { get; set; } = null!;
[NoUpdate] public string? RefIssuerID { get; set; }
[NoUpdate] public string? RefInvestorID { get; set; }
public enTaxResidentFlag? TaxResident { get; set; }
public enCorpBusinessStatus? BusinessStatus { get; set; }
public enCorpStatus Status { get; set; }
public string? Address1 { get; set; }
public string? Address2 { get; set; }
public string? Address3 { get; set; }
public string? Postcode { get; set; }
public string? State { get; set; }
public string? Country { get; set; }
public string? OfficeNo { get; set; }
public string? OfficeEMail { get; set; }
public string? PrincipalAddress1 { get; set; }
public string? PrincipalAddress2 { get; set; }
public string? PrincipalAddress3 { get; set; }
public string? PrincipalPostcode { get; set; }
public string? PrincipalState { get; set; }
public string? PrincipalCountry { get; set; }
public byte[]? OCtrl { get; set; }
}
2