public IHttpActionResult Get(string title) { if (string.IsNullOrEmpty(title)) { return(BadRequest()); } var work = workService.GetWorkByTitle(title); if (work == null) { return(NotFound()); } var dtoWork = new WorkDto(work); return(Ok(dtoWork)); }