Example #1
0
        public async Task <string> CreateSellAsync(string correlationToken)
        {
            string result = String.Empty;

            try
            {
                Folio_Venta = Guid.NewGuid().ToString();
                StatusSell statusSell = new StatusSell(_statusSellRepository);
                Status = await statusSell.GetStatusSellByDesc("Activa");

                SellItems     = new Dictionary <string, SellItem>();
                Date          = DateTime.UtcNow;
                ItemsQuantity = 0;
                result        = await _sellRepository.Add(this, correlationToken);
            }
            catch (Exception e)
            {
                throw e;
            }
            return(result);
        }
Example #2
0
        public async Task Create(Sell sell)
        {
            _sellRepository.Add(sell);

            await _sellRepository.UnitOfWork.SaveChangesAsync().ConfigureAwait(false);
        }