Skip to content

UsePropertiesForStoredProcResultSets

Simon Hughes edited this page Nov 29, 2023 · 1 revision

Settings.UsePropertiesForStoredProcResultSets = false

public class StpMultipleResultsWithParamsReturnModel
{
    public class ResultSetModel1
    {
        public int codeObjectNo { get; set; }
        public int? applicationNo { get; set; }
    }
    public List<ResultSetModel1> ResultSet1; // <--- Note that this is a field

    public class ResultSetModel2
    {
        public int Id { get; set; }
        public string Name { get; set; }
    }
    public List<ResultSetModel2> ResultSet2; // <--- Note that this is a field
}

Settings.UsePropertiesForStoredProcResultSets = true

public class StpMultipleResultsWithParamsReturnModel
{
    public class ResultSetModel1
    {
        public int codeObjectNo { get; set; }
        public int? applicationNo { get; set; }
    }
    public List<ResultSetModel1> ResultSet1 { get; set; } // <--- Note that this is a property

    public class ResultSetModel2
    {
        public int Id { get; set; }
        public string Name { get; set; }
    }
    public List<ResultSetModel2> ResultSet2 { get; set; } // <--- Note that this is a property
}