public void Post(SaleModel sale) { if (sale is null) { throw new ArgumentNullException(nameof(sale)); } string userId = User.FindFirstValue(ClaimTypes.NameIdentifier); _saleData.SaveSale(sale, userId); }
public void Post(SaleModel saleModel) { if (saleModel is null) { throw new ArgumentNullException(nameof(saleModel)); } else { //var userId = RequestContext.Principal.Identity.GetUserId(); // for .net framework web api var userId = User.FindFirstValue(ClaimTypes.NameIdentifier); saleData.SaveSale(saleModel, userId); } }
public void Post(SaleModel sale) { string userId = User.FindFirstValue(ClaimTypes.NameIdentifier); //RequestContext.Principal.Identity.GetUserId(); _saleData.SaveSale(sale, userId); }
public void Post(SaleModel sale) { string userId = User.FindFirstValue(ClaimTypes.NameIdentifier); _saleData.SaveSale(sale, userId); }
public void Post(SaleModel sale) { _saleData.SaveSale(sale); }
public void Post(SaleModel model) { string cashierId = User.FindFirstValue(ClaimTypes.NameIdentifier); _saleData.SaveSale(model, cashierId); }
public void Post(SaleModel sale) { var cashierId = User.FindFirstValue(ClaimTypes.NameIdentifier); _logger.LogInformation("Cashier {Cashier} checked out", cashierId); _saleData.SaveSale(sale, cashierId); }
public void Post(SaleModel sale) { string userId = "1"; saleData.SaveSale(sale, userId); }
public void Post(SaleModel sale) { saleData.SaveSale(sale, User.FindFirstValue(ClaimTypes.NameIdentifier)); }