csharpfritz / InstantAPIs

A library that generates Minimal API endpoints for an Entity Framework context.
MIT License
448 stars 58 forks source link

Allow mapping of data to a ViewModel #53

Open csharpfritz opened 2 years ago

csharpfritz commented 2 years ago

Introduce configuration to allow mapping from the datasource to a ViewModel, and mapping from the ViewModel to the datasource

Using Automapper may be the preferred technique here

ChristianWeyer commented 2 years ago

Very good idea. Should we rather refer to them as Data Transfer Objects (DTOs), and not ViewModels?

csharpfritz commented 2 years ago

I think you're right @ChristianWeyer - in APIs they're DTOs since there is no UI