public async Task Bonus_AddBonusAsync_Return_BonusDto() { CreateDefaultBonusServiceInstance(); var bonusDto = _mapper.Map <AddBonusDto>(_fakeBonuseDtos[0]); var bonus = await _bonusService.AddBonusAsync(bonusDto, Guid.Empty, default(CancellationToken)); Assert.NotNull(bonus); }
public async Task <ActionResult <ResultDto <BonusDto> > > AddBonusAsync([FromBody] AddBonusDto Bonus) { return(Ok(await _BonusService.AddBonusAsync(Bonus))); }
public async Task <ActionResult <ResultDto <BonusDto> > > AddBonusAsync([FromBody] AddBonusDto Bonus) { var userId = User.Claims.First(c => c.Type == ClaimTypes.NameIdentifier).Value; return(Ok(await _BonusService.AddBonusAsync(Bonus, Guid.Parse(userId)))); }