public async Task <Guid> AddAsync(User user, CancellationToken cancellationToken = default) { await toolShedContext .AddAsync(user); await toolShedContext.SaveChangesAsync(cancellationToken); return(user.UserId); }
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); }
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); }