public async Task <IActionResult> CreateAsync([FromBody] CadastroClienteViewModel novo, [FromServices] IComercianteAppServices clientAppServices) { if (!ModelState.IsValid) { return(BadRequest()); } await clientAppServices.Insert(novo); return(Ok(StatusCodes.Status201Created)); }
public async Task <IActionResult> GetAllAsync([FromServices] IComercianteAppServices clientAppServices) { return(Ok(await clientAppServices.GetAll())); }