v1.3.0 Restructure Saxonite workspace and upgrade to .NET 10 (#1)
Move Saxonite’s projects into a dedicated `Workspace` folder and align the solution with .NET 10 and the current Common workspace. Update encryption integration, test project structure and coverage, and repository guidance and upgrade notes. - Relocate application and library projects while retaining Git rename history. - Split tests into Admin, Online, and Shared projects; add representative behavioral and serialization tests. - Update Common integration, application version, and repository documentation. Application version: 1.3.0 Reviewed-on: #1 Co-authored-by: andy <andy@sarand.com>
This commit was merged in pull request #1.
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Sarand.Net.Standard.Base.App;
|
||||
using Sarand.Net.Standard.Base.Bus;
|
||||
using Sarand.Net.Standard.Base.Core;
|
||||
using Sarand.Net.Standard.Base.Dbas;
|
||||
using Saxonite.Net.Core.Web.Base.App;
|
||||
using Saxonite.Net.Core.Web.Online.Models;
|
||||
using Saxonite.Net.Standard.Base.App;
|
||||
using Saxonite.Net.Standard.Base.Bus;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Saxonite.Net.Core.Web.Online.Controllers
|
||||
{
|
||||
//=======================================================================
|
||||
// Online Reference Controller - Ajax actions only.
|
||||
//=======================================================================
|
||||
public partial class ReferenceController : SaxController_Online
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
public ReferenceController(SaxLocaliser localiser, ILogger<HomeController> logger) :
|
||||
base(localiser, logger)
|
||||
{}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Sports
|
||||
//-------------------------------------------------------------------
|
||||
private class AjaxResponse_SportList : AjaxResponse_Base
|
||||
{
|
||||
public List<SaxModel_Online.SportData> Sports { get; } = new List<SaxModel_Online.SportData>();
|
||||
}
|
||||
//-------------------------------------------------------------------
|
||||
[HttpPost]
|
||||
[Route("Reference/Ajax/GetSports")]
|
||||
public IActionResult Ajax_GetSportList(Model_Reference model)
|
||||
{
|
||||
String fn = GetType().Name + ".Ajax_GetSportList";
|
||||
String messageTitle = Localiser["reference.caption.sports"];
|
||||
AjaxResponse_SportList responseData = new AjaxResponse_SportList();
|
||||
|
||||
// Validate session and referrer.
|
||||
if (!ValidReferer) return Forbid();
|
||||
// User doesn't have to be logged in, eg. to register organisation.
|
||||
//if (!ValidUserSession) return GetAjaxResult_InvalidSession(responseData);
|
||||
|
||||
// Populate sports.
|
||||
foreach (SaxModel_Online.SportData sportData in model.GetSportDataList_Active())
|
||||
responseData.Sports.Add(sportData);
|
||||
|
||||
// Complete response.
|
||||
responseData.Success = true;
|
||||
|
||||
return Json(responseData);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Regions
|
||||
//-------------------------------------------------------------------
|
||||
private class AjaxResponse_RegionList : AjaxResponse_Base
|
||||
{
|
||||
public List<SaxModel_Online.RegionData> Regions { get; } = new List<SaxModel_Online.RegionData>();
|
||||
}
|
||||
//-------------------------------------------------------------------
|
||||
[HttpPost]
|
||||
[Route("Reference/Ajax/GetRegions")]
|
||||
public IActionResult Ajax_GetRegionList(Model_Reference model)
|
||||
{
|
||||
String fn = GetType().Name + ".Ajax_GetRegionList";
|
||||
String messageTitle = Localiser["reference.caption.regions"];
|
||||
AjaxResponse_RegionList responseData = new AjaxResponse_RegionList();
|
||||
|
||||
// Validate session and referrer.
|
||||
if (!ValidReferer) return Forbid();
|
||||
// User doesn't have to be logged in to query regions, eg. for organisation request.
|
||||
//if (!ValidUserSession) return GetAjaxResult_InvalidSession(responseData);
|
||||
|
||||
// Populate regions.
|
||||
foreach (SaxModel_Online.RegionData regionData in model.GetRegionDataList_Active())
|
||||
responseData.Regions.Add(regionData);
|
||||
|
||||
// Complete response.
|
||||
responseData.Success = true;
|
||||
|
||||
return Json(responseData);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
Reference in New Issue
Block a user