You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When mapping inner object to nullable property got property default value instead of null when the inner object is null
Example:
class Program
{
static void Main(string[] args)
{
var result = new Child().Adapt<ChildResource>();
Console.WriteLine(result.ParentId); //result.ParentId should be null not empty Guid
}
}
public class Parent
{
public Guid Id { get; set; }
}
public class Child
{
public Guid Id { get; set; }
public Parent Parent { get; set; }
}
public class ChildResource
{
public Guid Id { get; set; }
public Guid? ParentId { get; set; }
}