I have this easy DTO (Data Transfer Object):
public class SoonestOffersModel
{
public Offer Offer { get; set; }
public DateTime Date { get; set; }
}
Offer is entity. Our architect is against these DTOs, as he is saying this is very old and it is in need only when people don't think about design to include all fields before.
He is against model or database first approach and favors code first approach. In this case he has entity models pre-created.
So I asked him if we want to do some additional logic and apply Date with Offer entity for View purpose, he suggested I should've just add nullable DateTime field into entity model Offer itself.
First time hearing this. So if you have new requests each time to show more and more fields that correspond to Offer you are adding those in entity model?
I am not sure why DTO is bad, since I've always used it, and I don't do code first approach.
I would love to hear your opinion on how much this is true and if I should be worried about this?