# Oracle Functions and .NET - Getting Started Part 3

In Part 1 of this blog post, we set up your OCI account to be ready to deploy functions.

In Part 2 of this blog post, we set up your development environment to be ready to deploy functions.

In Part 3, we will dive into the main content to build and publish our first .NET OCI function. As I mentioned at the end of party 2, most of this work has been in getting prepaired to develop functions. You don’t have to go through hours of setup every time you want to create a new function!

## Logging into docker

In order to progress with publishing functions you will need to log into docker so that you can push your functions to the repository. Use the following command:

```bash
docker login -u '<<tenancy-namespace>>/<<user-name>>' ocir.<<regionkey>>.oci.oraclecloud.com
```

The Tenancy Namespace is a value we recorded earlier. The username will be your email address to log into your OCI account. As I mentioned in Part 2 of the blog, I am assuming at this point that you are either the root user set up with your OCI account creation or a member of the Administrators group.

When the docker prompt asks you for the password, provide the Auth key that was created earlier, NOT your OCI login password.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1733573333247/20b980cf-fa1c-44eb-87b5-5ef12bb94020.png align="center")

Once logged in, your password will be saved. Make sure to keep your system secure!

## Creating a new function

From the command line, navigate to a location where you are going to store your source code. Use the following command to create a new function.

```bash
fn init --runtime dotnet hello-world
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1733573966902/ea628ade-5713-4a34-a024-f9be3b925ef7.png align="center")

This will create a boilerplate OCI function called “hello-world” using the .NET runtime… of course! The command line will set up a few configuration files, as well as the .NET project that will be used to build your function’s executable. As I am writing this, Oracle functions support running .NET only on X86 architecture, not ARM.

## Deploy your function to OCI.

Type the following commands to deploy your function:

```bash
cd hello-world
fn -v deploy --app <<Your Application Name>>
```

The application name is the name of the application you created in Part 1 of the blog post.

*Note: If you run into issues with the deployment reporting that you are unauthorized, double-check your login command. It took me some digging to ensure I had it correct. My login command looks like this for US-East(Ashburn):*

```bash
docker login -u '<<Namespace>>/<<Email@address>>' ocir.us-ashburn-1.oci.oraclecloud.com
```

## Invoking your function

Once your function has been deployed, you will want to test the function to ensure that all is well. Luckily, the Fn command line makes this pretty easy.

```bash
fn invoke <<Your Application Name>> <<Your Function Name>>
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1733577771602/37751565-6d70-48ca-9c42-0724d6a429fb.png align="center")

## Your function in the OCI console

In the OCI console, you can select the hamburger menu and then select Developer Services and Applications under functions Functions.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1733577962602/01a59b76-1cff-4cfc-be9c-d0a279d22550.png align="center")

Click on your application.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1733577991658/250a7b8b-dd9e-4df0-83f4-56e370a31a98.png align="center")

Scroll down, and you can see the individual functions that are part of your application.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1733578081157/7ff7ad04-f31e-453b-8123-478b9385f6b0.png align="center")

From here, you are ready to start building new functions to solve many business problems!
