Assuming we are skipping AutoMapper as suggested here, another place where pseudoAutoMapper contortions could occur is at MVC controllers wherein POCOs are reshaped as anonymous types before being handed onto the Angular head for the greater headless app (ultimately an exposed API spitting JSON). If you need the same anonymous type twice you could have a static utility for that in C# and maybe it is best to have a static utility anyways to get that logic out of the controller itself.
No comments:
Post a Comment