private async Task <Sales> CreateSales(Sales EDsale) { using (var ctx = new SalesService()) { return(await ctx.CreateSales(EDsale).ConfigureAwait(false)); } }
public IActionResult AddSales([FromBody] Sales product) { if (ModelState.IsValid) { _salesService.CreateSales(product); return(Ok(product)); } return(BadRequest(ModelState)); }