M
M
Matisumi2018-12-23 20:04:09
.NET
Matisumi, 2018-12-23 20:04:09

.NET WebAPI service - how to organize data models?

What is the best way to organize the storage of data models in a client-server application, where the server is made using WebAPI technology? On the server and the client to store local versions of data models? Or use a common assembly with data models for client and server? In WCF, there are no particular problems with this, the models "come" along with a link to the service, with WebAPI it is not clear how to ensure the integrity of the client and server models.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Egorov, 2018-12-23
@SergeyEgorov

If you are involved in the development of the client, then theoretically you can put the models in a separate assembly and include it in the server project and in the client project. If your clients will be other people's uncles and aunts, then you may not want to show them your assembly. Or maybe they don't want to do the client side in .NET C#.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question