-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does it support inheritance? #6
Comments
Just provide a simple DTO generation, here are the use cases #4 , |
Some simple example for collections in DDD style:
It should generate a Also the scenario gets a little more tricky when the image the collection is of an abstract class, for example Mind this scenarios are common when working with DDD and CQRS, you want those models to their DTO version in order to use them in command requests for their command handler for example creating a new Venue would require a VenueDto as a the command request. |
Sorry, I don't have any plans to automatically generate DTO internal classes in DTOs, can only implement the requirements with the following code : [AutoDto<VenueImage>]
public partial class VenueImageDto
{
}
[AutoDto<Venue>(nameof(Venue.Images))]
public partial class VenueDto
{
public IList<VenueImageDto>? Images { get; set; }
} |
Is it compatible with entity inheritance and DDD best practices? for example my entity has a
IReadOnlyCollection<RelatedEntity>
and RelatedEntity its a abstract class which is implemented by MyClassA, MyClassB and MyClassC. Will the library make the following DTOs?:RelatedEntityDto (abstract), MyClassADto, MyClassBDto and MyClassCDto?.
Thanks.
The text was updated successfully, but these errors were encountered: