0

Below is the object I am trying to save in Realm DB where Student will be RealmObject. I want MyCustomObj member in the below model to be saved as a JSON object and also an OList member in below model to be saved as an array of objects.

public class Student:RealmObject
    {
        [JsonProperty]
        [PrimaryKey]

        public int StudentID { get; set; }
        [JsonProperty]
        public string StudentName { get; set; }

        [JsonProperty]
        public MyCustomObj MyCustomObj { get; set; }

        [JsonProperty]
        public IList<OptionItems> OList { get;  }
    }

0 Answers0