public IActionResult AddBooks(BookStoreModel bookStoreModel) { var result = bookManager.AddBooks(bookStoreModel); try { if (result == 1) { this.distributedCache.Remove(key); msmq.SendMessage("Books name " + bookStoreModel.BookTittle + " added successfully.", result); return(this.Ok(bookStoreModel)); } else { return(this.BadRequest(JsonErrorModel.Json())); } } catch (BookStoreException) { return(BadRequest(Exception_type.Invalid_exception.ToString())); } }