ASP. NET Core Web API Cassandra CRUD operation, cassandracrud
In this article, we will create a simple Web API to perform CRUD operations on a "todo" list, and use Apache Cassandra to store data. No UI will be created here, the Web API test will be completed using Postman.
ASP. NET Core is ASP. NET, ASP. NET Core is a brand new open-source and cross-platform framework for building cloud-based modern applications connected to the Internet, such as Web applications, IoT applications, and mobile backend applications.
ASP. NET Core has built-in support for building Web APIs with MVC Architecture. The two frameworks are unified to make it easy to build applications, including user interfaces (HTML) and APIs. Now they share the same code library and pipeline.
Apache Cassandra is a highly scalable, high-performance distributed database designed to process a large amount of data on a large number of commercial servers, providing high availability and no spof. It is a NoSQL database.
Software environment:
- Debian 8
- Visual Studio Code
- Nodejs
- Apache Cassandra
- . NET Core SDK
Create an ASP. NET Web API Project
Here we use Yeoman to generate the basic template of the Web API application. First, we use npm to install Yeoman:
npm install -g yo
Then install the ASP. NET Web Application Generator:
npm install -g generator-aspnet
After the installation is complete, go to the directory where you want to store the Web API application file and run:
yo aspnet
Select Web API Application and press enter to confirm. Then enter the Application name CassandraCRUD and press enter to confirm. Yeoman will automatically generate a basic ASP. NET Core Web API Application.
Read the full text...