Beispiel #1
0
        public IHttpActionResult Get(int?id)
        {
            if (id == null || id <= 0)
            {
                return(BadRequest());
            }
            var work = workService.GetByID((int)id);

            if (work == null)
            {
                return(NotFound());
            }
            var dtoWork = new WorkDto(work);

            return(Ok(dtoWork));
        }