public IActionResult AddLibrary(Library library) { if (library == null) { return(BadRequest()); } if (!ModelState.IsValid) { return(BadRequest(ModelState)); } libraryService.AddLibrary(library); return(Ok(library)); }