Ejemplo n.º 1
0
        /// <summary>
        /// Creates the lot and saves it to the database.
        /// </summary>
        /// <param name="lot"></param>
        public async Task CreateLotAsync(Lot lot)
        {
            if (lot == null)
            {
                throw new ArgumentNullException(nameof(lot));
            }

            await MarkLotAsActive(lot);

            await _lotRepository.AddAsync(lot);

            await _unitOfWork.CompleteAsync();
        }