Hi,
I noticed in PR #47 (saw this late: #12) that you’re adding support for including navigation properties in generated DTOs.
I have a use case where instead of including the full navigation objects, I’d like to include only their IDs in the generated DTOs.
For example, given a model like this:
public class Category
{
public int Id { get; set; }
public string Name { get; set; } = null!;
public virtual ICollection<Product> Products { get; set; } = new List<Product>();
}
I’d like the generated CreateDto / UpdateDto to look like:
public record CategoryCreateDto
{
public string Name { get; init; } = null!;
public IEnumerable<long> ProductIds { get; init; } = new();
}
Is there a way to configure Facet so that navigation collections are represented as lists of IDs in the generated DTOs?
Hi,
I noticed in PR #47 (saw this late: #12) that you’re adding support for including navigation properties in generated DTOs.
I have a use case where instead of including the full navigation objects, I’d like to include only their IDs in the generated DTOs.
For example, given a model like this:
I’d like the generated
CreateDto/UpdateDtoto look like:Is there a way to configure Facet so that navigation collections are represented as lists of IDs in the generated DTOs?