Esempio n. 1
0
        public IHttpActionResult Get(int id)
        {
            if (id <= 0)
            {
                return(BadRequest());
            }
            var works = workService.GetAllWorksForComposer(id)
                        .Select(m => new WorkDto(m)).ToList();

            if (works.Count == 0)
            {
                return(NotFound());
            }
            return(Ok(works));
        }