Giter Site home page Giter Site logo

azure-samples / azure-sql-binding-func-dotnet-todo Goto Github PK

View Code? Open in Web Editor NEW
11.0 14.0 13.0 148 KB

Todo Backend with Azure SQL binding for Azure Functions and .NET

License: MIT License

C# 95.77% TSQL 4.23%
azure azure-functions azure-sql sql-server

azure-sql-binding-func-dotnet-todo's Introduction

page_type languages products name description urlFragment
sample
csharp
sql
tsql
azure-functions
azure-sql-database
sql-server
azure-sql-managed-instance
azure-sqlserver-vm
dotnet
ToDo API backend with Azure SQL bindings
Implement the ToDo Backend in .NET with Azure SQL bindings for Azure Functions
todo-backend-dotnet-azure-sql-bindings-azure-functions

ToDo Backend Implementation in .NET with Azure SQL bindings for Azure Functions

License

This project implements the Todo Backend API using Azure Functions (.NET) and Azure SQL through HTTP triggers and Azure SQL input/output bindings.

ToDo Backend

This project implements a ToDo endpoint with the following actions:

  • GET all ToDos
  • GET a ToDo by Id
  • POST a new ToDo
  • PATCH an update to a ToDo
  • DELETE a ToDo by Id
  • DELETE all ToDos

Getting Started

Quickstart

  1. Configure your development environment for creating Azure Functions with .NET. This VS Code example includes the .NET SDK, Azure Functions Core Tools, and the C# and Azure Functions extensions for VS Code.
  2. Clone the repository to your environment
  3. Create an Azure SQL Database and execute the script in /sql/create.sql to create the table and stored procedure used by this example. Optionally the local development can be done against an local database, such as in a Docker container.

Application Settings

This example uses 2 application settings to control either secret or deployment-specific information. During local development, these values are stored in local.settings.json at the project root.

  • Connection string to SQL database (General format) "SqlConnectionString": "Server=tcp:SERVERNAME,PORT;Initial Catalog=DATABASENAME;Persist Security Info=False;User ID=USERNAME;Password=USERPASSWORD;"
  • Primary endpoint URL "ToDoUri": "http://localhost:7071/api/ToDo"

Testing

Using the REST Client extension for VS Code, the testing.http file provides example requests for the functionality.

Testing in VS Code

Demo/Validation

The ToDo backend specification has an accompanying runner for tests that validate the functionality. To run these tests on the demo endpoint, go to http://todobackend.com/specs/index.html?https://azuresqltodo.azurewebsites.net/api/ToDo.

The functions runtime and SQL database may have gone idle when you test the link, if you find tests fail retry after a few seconds.

Validation

Resources

azure-sql-binding-func-dotnet-todo's People

Contributors

dzsquared avatar gbelenky avatar microsoft-github-operations[bot] avatar microsoftopensource avatar mtrilbybassett avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.