I know I'll probably get slapped down for this post, but I need to know how to do it properly.
My website is a .Net web project in a folder with this structure.
- .sln - file
- API - folder (contains controllers, DTO's, extensions, .csproj - Sdk.Web)
- Client - folder (contains Angular project)
- Core (.Net Sdk) - folder that contains entities, enums, interfaces, .csproj -> .Sdk
- Infrastructure (.Net Sdk) - folder that contains dataContext.cs, migration files, services, .csproj -> .Sdk
Problem - Currently I have a controller that accepts a webhook for Stripe and I want to offload this webhook out of my website controller and into a Azure Function, this new Azure function will need to access my business entities (Core) and my database (Infrastructure) to run business logic before saving to the DB, so
Question - I'm not sure if I need to create an Azure project in my solution in it's own folder (call it AZFunctions), outside the solution or just an Azure function file somewhere in an already existing project?
Concerns - I'm using a EF code first approach, so when I change an entity then migrate and update my DB, won't the Azure Function fail if it's deployed? If I create a new Azure Function project in a new folder in my solution, the new project has a local.settings.json file that would be separate from my appsettings.json file in my API.