none
Serializable class not getting bound in WebApi RRS feed

  • General discussion

  • I have the complex type class below which is not getting bound to the data sent via web api(screenshots attached)

    [Serializable]

        public class DefaultSearchCriteria : CriteriaBase

        {

            public DefaultSearchCriteria()

            {

            }

            public override string DefaultProperty

            {

                get;

                set;

            }

            public override int CriteriaNumber

            {

                get;

                set;

            }

            public int ResearchId

            {

                get;

                set;

            }

        }

    If I remove the [Serializable] attribute then the data gets bound. 

    the webapi method below:

    public string SetCriteria1(DefaultSearchCriteria request)
    {

    I have also checked if the data gets bound if I send it via form and it does. 

    Ideas anyone?


    Friday, February 28, 2014 1:36 PM

All replies