A sample CRUD project demonstrates the process of Azure Function using EntityFramework Core to operate Azure Sql database.
Create a new user data in the sql database.
POST /api/create
Name | Type | Description |
---|---|---|
name |
string |
Required. The user's name. |
password |
string |
Required. The user's password. |
{
"name": "lydia",
"password": "password"
}
user is created, the id is xxx
Get a user data from the sql database.
GET /api/read/:userid
{
"id": "fc78c67e-cf6a-4335-ae9c-7ac8459dbc2e",
"name": "lydia",
"password": "password"
}
Get a users list from the sql database.
GET /api/list
[
{
"id": "f560927e-4564-456f-aceb-35aa32cf7c08",
"name": "susan",
"password": "password"
},
...
]
Update a existing user data in the sql database.
PUT /api/update/:userid
Name | Type | Description |
---|---|---|
name |
string |
Required. The user's name. |
password |
string |
Required. The user's password. |
Delete a user data in the database.
DELETE /api/delete/:userid
Using VS Code To Build An Azure Function And SQL Database App With .Net Core On Azure Cloud
CI/CD For Azure Functions App By Using GitHub And Azure DevOps