Posting as Answer since there is a 1000-character limit on comments
@Dan I am not able to repro this.
Here is a simple test I set up using your pseudo code. I am able to serialize without any issues.
Please let me know if I am missing something here.
using Microsoft.Azure.Cosmos.Table;
using System;
using System.ComponentModel;
using System.Runtime.Serialization;
namespace ConsoleApp1
{
[DataContract]
public class ModelBase : TableEntity, INotifyPropertyChanged
{
// base-shared logic
public string BaseClassProperty { get; set; }
public event PropertyChangedEventHandler PropertyChanged;
}
[DataContract]
public class User : ModelBase
{
public string DerivedClassProperty { get; set; }
}
internal class Program
{
private static void Main(string[] args)
{
var user = new User
{
PartitionKey = Guid.NewGuid().ToString(),
RowKey = Guid.NewGuid().ToString(),
BaseClassProperty = "BaseClassProperty",
DerivedClassProperty = "DerivedClassProperty"
};
var serializedData = System.Text.Json.JsonSerializer.Serialize(user);
Console.WriteLine(serializedData);
}
}
}