Example #1
0
        public void Post(SaleModel sale)
        {
            if (sale is null)
            {
                throw new ArgumentNullException(nameof(sale));
            }

            string userId = User.FindFirstValue(ClaimTypes.NameIdentifier);

            _saleData.SaveSale(sale, userId);
        }
Example #2
0
 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);
        }
Example #4
0
        public void Post(SaleModel sale)
        {
            string userId = User.FindFirstValue(ClaimTypes.NameIdentifier);

            _saleData.SaveSale(sale, userId);
        }
Example #5
0
 public void Post(SaleModel sale)
 {
     _saleData.SaveSale(sale);
 }
Example #6
0
        public void Post(SaleModel model)
        {
            string cashierId = User.FindFirstValue(ClaimTypes.NameIdentifier);

            _saleData.SaveSale(model, cashierId);
        }
Example #7
0
 public void Post(SaleModel sale)
 {
     var cashierId = User.FindFirstValue(ClaimTypes.NameIdentifier);
     _logger.LogInformation("Cashier {Cashier} checked out", cashierId);
     _saleData.SaveSale(sale, cashierId);
 }
Example #8
0
        public void Post(SaleModel sale)
        {
            string userId = "1";

            saleData.SaveSale(sale, userId);
        }
Example #9
0
 public void Post(SaleModel sale)
 {
     saleData.SaveSale(sale, User.FindFirstValue(ClaimTypes.NameIdentifier));
 }