public async Task <int> AddUnpaidRequestAsync(IEnumerable <TbUnpaidRequest> unpaidRequests, CancellationToken cancellationToken) { if (unpaidRequests == null) { return(0); } _unpaidsDbContext.TbUnpaidRequest.AddRange(unpaidRequests); return(await _unpaidsDbContext.SaveChangesAsync(cancellationToken)); }
public async Task <int> AddUnpaidRequestAsync(TbAccessToken accessToken, CancellationToken cancellationToken) { _unpaidsDbContext.TbAccessToken.Add(accessToken); return(await _unpaidsDbContext.SaveChangesAsync(cancellationToken)); }
public async Task <int> AddUnpaidBatchAsync(TbUnpaidBatch unpaidBatch, CancellationToken cancellationToken) { _unpaidsDbContext.TbUnpaidBatch.Add(unpaidBatch); return(await _unpaidsDbContext.SaveChangesAsync(cancellationToken)); }