ancora fix deploy IOC

This commit is contained in:
Samuele Locatelli
2023-04-04 16:37:44 +02:00
parent 9525fd3726
commit 5c585f6b7f
10 changed files with 321 additions and 180 deletions
+26 -12
View File
@@ -1,8 +1,5 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using MP.Data.MgModels;
using MP.SPEC.Data;
using Newtonsoft.Json;
using NLog;
@@ -15,22 +12,19 @@ namespace MP.SPEC.Controllers
[AllowAnonymous]
public class RecipeController : ControllerBase
{
/// <summary>
/// Dataservice x accesso DB
/// </summary>
protected MpDataService DService { get; set; }
#region Public Constructors
public RecipeController(IConfiguration configuration, MpDataService DataService)
{
Log.Info("Starting RecipeController");
_configuration = configuration;
DService = DataService;
Log.Info("Avviata classe Recipe");
Log.Info("Avviata classe RecipeController");
}
private static IConfiguration _configuration = null!;
private static Logger Log = LogManager.GetCurrentClassLogger();
#endregion Public Constructors
#region Public Methods
[HttpGet("GetRecipe")]
public async Task<string> GetRecipe(int idxPODL)
@@ -43,6 +37,7 @@ namespace MP.SPEC.Controllers
}
return answ;
}
[HttpGet("GetRecipeXML")]
public async Task<string> GetRecipeXML(int idxPODL)
{
@@ -58,5 +53,24 @@ namespace MP.SPEC.Controllers
}
return answ;
}
#endregion Public Methods
#region Protected Properties
/// <summary>
/// Dataservice x accesso DB
/// </summary>
protected MpDataService DService { get; set; }
#endregion Protected Properties
#region Private Fields
private static IConfiguration _configuration = null!;
private static Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
}
}
}