This project has moved and is read-only. For the latest updates, please go here.

Deserializing inherited linq object issue

Mar 25, 2012 at 10:04 AM
Edited Mar 25, 2012 at 10:07 AM

Hi, I have used Linq-to-SQL objects in my web app. My base and inherited classes look like this:

//Base Class: this will define the attributes that is auto-generated
//when using Linq-2-SQL ORM. Note this class is a partial class
public partial class Category : INotifyPropertyChanging, INotifyPropertyChanged 

//Inherited Class:
public class CategoryEntity : Category
        private int _ActiveAdsCount;

        public int ActiveAdsCount
                return _ActiveAdsCount;

                _ActiveAdsCount = value;

        public int DisplaySequence { get; set; }



when serialize Json OUTPUT (note the ActiveAdsCount and DisplaySequence values):


When I am calling the deserialze object method, it shows "ActiveAdsCount" and "DisplaySequence" have 0 values while the json shows proper correct information coming from Database. So, the problem is in deserialization. Kindly help...

Thanks in advance