C#C
C#3y ago
reeeeeee

❔ MVC app architecture which is consuming 3rd party API

I am developing a fresh MVC app, but because I usually maintain/upgrade existing app, I am not really sure how to approach this from the architecture perspective, so I won't make too big of a mess.
My solution is currently made out of 2 layers:
  • UI Layer (controllers, viewmodel, resx translations)
  • Data layer (Entities, dbContext, migrations, Services, IServices) - I am not sure if this is correct or if there is any benefit, having service (control database entity) and its interface in the same project?
And about the consuming 3rd party API - this app will partly work with Zebra FX7500 RFID reader, which is controlled over its API. How/Where would I put this RFID controlling logic? I would need a few methods for it - Authenticate, start, stop, ping,.. I would also have some DTOs, and I think thats it. Should I create another project inside the solution, something like "Reader management" (and if yes, what type would this be, and what else would I need)? Or should I put it somewhere in UI layer, since its not that complex?
Thanks for your help!
Was this page helpful?