Exemplo n.º 1
0
        public async Task <ActionResult> AddBeisl([FromBody] BeislDto beisl)
        {
            var _beisl = await _beislService.AddBeislAsync(beisl);

            return(Created($"{HttpContext.Request.Path}/{_beisl.Id}", _beisl));
        }
Exemplo n.º 2
0
        public async Task <BeislDto> AddOrUpdateBeislAsync(BeislDto beisl)
        {
            var _beisl = await _beislRepository.AddOrUpdateAsync(_mapper.Map <BeislDto, BeislEntity>(beisl));

            return(_mapper.Map <BeislEntity, BeislDto>(_beisl));
        }