Пример #1
0
        public async Task <IActionResult> Post(VisitorModel visitorModel)
        {
            var visitor       = _mapper.Map <Visitor>(visitorModel);
            var createdTicket = await _visitorService.AddAsync(visitor);

            return(Ok(createdTicket));
        }
Пример #2
0
 public async Task <object> AddVisitor([FromQuery] int idRoom,
                                       [FromQuery] Guid idUser, [FromBody] VisitorModel model)
 {
     return(await _visitorService.AddAsync(idRoom, idUser, model));
 }