Пример #1
0
 public async Task <string> UpdateVisitor(Visitor visitor)
 {
     if (visitor == null)
     {
         return("-1");
     }
     return(await _visitorService.UpdateVisitor(visitor));
 }
Пример #2
0
        public async Task <IActionResult> Patch(int visitorId, [FromBody] Visitor visitor)
        {
            if (!ModelState.IsValid)
            {
                return(UnprocessableEntity());
            }

            if (!(await _visitorService.Exists(visitorId)))
            {
                return(NotFound());
            }

            await _visitorService.UpdateVisitor(visitorId, visitor);

            return(NoContent());
        }
 public async Task <VisitorAddResponse> UpdateVisitor(VisitorAddRequest model)
 {
     return(await _visitorService.UpdateVisitor(model));
 }