GithubHelp home page GithubHelp logo

azurefunctions-csharp-sample's Introduction

AzureFunctions-CSharp-Sample

This application offers same samples using Azure Functions.

  • How to use QueueTriggers
  • How to call nested Azure Functions applicatins ex. from QueueTriggers to HttpTriggers
  • How to access SQL DB in Azure Functions
  • How to access Azure Storage accounts in Azure Functions

Requirement

Please setup "Azure Functions Tools for Visual Studio 2017" in your local machine.

How to run this applications in your local machine

After pulling this application in your local machine. Edit "AzureFunctions-CSharp-Sample.git\JobDemoFunctionApp\JobDemoFunctionApp\local.settings.json".


{
  "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "[YOUR_STORAGE_CONNECTION_STRING]",
    "AzureWebJobsDashboard": "",
    "Azurefunctions822d656e_CONNECTION": "[YOUR_STORAGE_CONNECTION_STRING]",
    "Function_FQDN": "[YOUR_AZURE_FUNCTIONS_FQDN such likehttp://localhost:7071]"
  },
  "ConnectionStrings": {
    "SQLDB_CONNECTION": "[YOUR_SQL_DB_CONNECTION_STRING]"
  }
}

And create a SQL table in your SQL Database using "AzureFunctions-CSharp-Sample.git\AzureFunctions-Sample-DDL.sql".

Now, you can run this application in your local machine. You can debug your application using Visual Studio offering features.

How to run this applications in Azure environment

At first, create Azure Function in Azure portal like below. 01-Create-AzureFunctions.PNG

Setup your Azure Functions in Azure portal. Choose "Application settings".

05-Setup-AzureFunctions.PNG

Setup "Application settings" section in "Application settings" tab. Setup "Azurefunctions822d656e_CONNECTION" and "Function_FQDN" variables in the tab.

06-Setup-AzureFunctions.PNG

Setup "Connection strings" section in "Application settings" tab. Setup "SQLDB_CONNECTION" variables in the tab.

07-Setup-AzureFunctions.PNG

Publish this application with Visual Studio following below images.

02-Publish-AzureFunctions.PNG 03-Publish-AzureFunctions.PNG 04-Publish-AzureFunctions.PNG

And create a SQL table in your SQL Database using "AzureFunctions-CSharp-Sample.git\AzureFunctions-Sample-DDL.sql" if it still doesn't exist.

For confirming this applicaion behavior, please refer below.

  • Put queue messages into your "myqueue-items" queue of your Azure Storage.
  • Access "SQLDBTimerTrigger" function in your Azure Functions, and press "Run" button. You can watch logs in bottom. Please read "SQLDBTimerTrigger.cs" for detail.

08-Execute-AzureFunctions.PNG

Trouble shooting

  • Note your firewall and gateway when you run this applicaiton in your local machine

azurefunctions-csharp-sample's People

Contributors

normalian avatar

Watchers

James Cloos 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.