ТКС feedBack - LoiIver/documents GitHub Wiki
Зачем нужен IConnection, (abstract) BaseConnection, Connection?
В чём разница между MVCController и WebAPIController
(в разрезе WebAPI 2.0)
-
API Controllers decouples code from serialization of results: API:
public EventModel GetEvents(int quoteId, string market , string quote , int? pageNumber = null, int? pageSize = null)
{
var model = _eventsManager.GetEvents(quoteId, market, quote ,pageNumber, pageSize);
return model;
}
-
Content negotiation: Components called formatters serializes the data returned to the client. They are automatically selected based on the content of the Accept header of the incoming request. You can either use built- in formatter such as: JSON and Xml or replace them by modifying the configuration. Web API will resolve our objects to the suitable format using content negotiation. or actions that don’t match with one of those verbs, the default verb supported will be “POST”. Thus, we have to decorate all the actions that don’t meet with this naming conventions by one of the following attributes:
- HttpGet
- HttpPut
- HttpPost
- HttpDelete
MVC Controllers by default dispatch actions by name. A specific action name in a controller will directly map to the URL.
-
Hosting
-
HTTP Verbs Web API Controllers by default dispatch to actions by HTTP verbs. Action names will start with one of the verb names (GET, PUT, POST, and DELETE). For instance, Get, GetBooks, and GetById will map to the verb name “GET”.
Какие бывают коллекции?
string.internal