public IActionResult Update(int id, [FromBody] SalesInvoice sales) { if (ModelState.IsValid) { sales.Id = id; //productTypes.UpdatedBy = User.Identity.Name; sales.UpdatedBy = "Admin"; sales.UpdatedDate = DateTime.Now; var SalesInvoiceEntity = _salesinvoiceService.Update(sales); return(Ok(SalesInvoiceEntity)); } return(BadRequest()); }