Пример #1
0
        public IActionResult GetAuthorCollection([ModelBinder(BinderType = typeof(ArrayModelBinder))] IEnumerable <Guid> ids)
        {
            if (ids == null)
            {
                return(BadRequest());
            }

            var authors = _authorService.GetAuthorsByIds(ids);

            if (ids.Count() != authors.Count())
            {
                return(NotFound());
            }

            return(Ok(authors));
        }