Ejemplo n.º 1
0
        public async Task <Guid> AddAsync(User user, CancellationToken cancellationToken = default)
        {
            await toolShedContext
            .AddAsync(user);

            await toolShedContext.SaveChangesAsync(cancellationToken);

            return(user.UserId);
        }
Ejemplo n.º 2
0
        public async Task AddAsync(OrderRecord orderRecord, CancellationToken cancellationToken = default)
        {
            if (orderRecord == null)
            {
                throw new ArgumentNullException(nameof(orderRecord));
            }

            await toolShedContext.AddAsync(orderRecord, cancellationToken);

            await toolShedContext.SaveChangesAsync(cancellationToken);
        }
Ejemplo n.º 3
0
        public async Task <Guid> AddAsync(ItemType itemType, CancellationToken cancellationToken = default)
        {
            if (itemType == null)
            {
                throw new ArgumentNullException();
            }

            await toolShedContext.AddAsync(itemType);

            await toolShedContext.SaveChangesAsync(cancellationToken);

            return(itemType.ItemTypeId);
        }