I have this web API project which handle all database access via entity framework.
I have another web client reside in DMZ to call those APIs (via ajax or c#) in the web API project.
When I make API call via c#, models passing between web client and web API are the same.
For web API, the model is generate by entity framework (database first).
For web client, I create a model class.
Now when I change\update the table in database, I can easily update the model in web API via entity framework but I have to manually update the model class in web client.
It's easy when I only have a few models to maintain, not when I have a lot of models.
Should i separate them just for the sake of separation or I can just ask web client to reference web API and just use those models generate by entity framework?
Are there any security concern if I ask web client to reference web API project?
How should I manage models between web client and web API in this situation?