public async Task <IActionResult> Create([FromBody] PostBookRequestModel model) { if (!await _authorsService.ExistsAsync(model.AuthorId)) { return(BadRequest($"Author with id-{model.AuthorId} doesn't exist.")); } return(this.Ok(await _booksService.CreateAsync(model.AuthorId, model.Title, model.Description, model.Price, model.Copies, model.Edition, model.AgeRestriction, model.ReleaseDate, model.Categories))); }