S
S
stcmd042362018-05-22 18:10:03
ASP.NET
stcmd04236, 2018-05-22 18:10:03

How to use interfaces to bind data model in aspnet controllers?

Good afternoon! How can interfaces be used to bind data model in asp net core controller?
Example:

[HttpPost("{catalogId:int}")]
public async Task<IActionResult> AddProdict(int catalogId, [FromBody] IProduct product)
{
     /// операция
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question