Pattern design for Webapi project

Asked

Viewed 110 times

0

I need to create a project with Webapi to consume some procedures of a remote SQL database, for example: sp_retornaProdutos(1) turning that into /produtos/1 and returning the result in JSON.

I thought of creating models of request and sponse, thus:

// Model para envio de parâmetros
public class ProdutoReq
{
    int id;
}

// Model para retorno do resultado
public class ProdutoRes
{
    int id;
    string nome;
    string descricao;
    decimal preco;
}

I would like to know how you indicate to build this application, what design standard to use?

  • In what language? Java? C#?

1 answer

0

Browser other questions tagged

You are not signed in. Login or sign up in order to post.