Skip to content
Discussion options

You must be logged in to vote

Perhaps you can try implementing ModularTenantEvents and in this service, import the recipes from a folder eg.

public override async Task ActivatingAsync()
{

using (FileStream fs = File.Open(pathToRecipeJson, FileMode.Open, FileAccess.Read))
using (StreamReader sr = new StreamReader(fs))
{
    string json = await sr.ReadToEndAsync();
    if (!json.IsJson(JOptions.Document))
    {
         _logger.LogError("Invalid Recipe JSON.");
    }
    string tempArchiveFolder = PathExtensions.Combine(Path.GetTempPath(), Path.GetRandomFileName());
    try
    {
        Directory.CreateDirectory(tempArchiveFolder);
        System.IO.File.WriteAllText(Path.Combine(tempArchiveFolder, "Recipe.json"), jso…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by effapp
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants