//using FastEndpoints; //using GB5Shared.DaprCache; //using GB5Shared.DTO.Framework.Criteria; //using GB5Shared.DTO.Framework.Login; //using GB5Shared.DTO.Framework.ResponseStandard; //using MMBLL.Item; //using MMDAL.DTO.Item; //using Newtonsoft.Json; //using static GB5Shared.GB5Constant.Constant; //namespace MMSL.EndPoints.ItemService //{ // public sealed class GetItemMasterReport : Endpoint // { // private readonly IItemBLL _itemBLL; // public GetItemMasterReport(IItemBLL itemBLL) // { // _itemBLL = itemBLL; // } // public record GetItemMasterReportParameters( // [property: QueryParam] int FirstNumber, // [property: QueryParam] int MaxResult, // [property: QueryParam] string Orderbyfield, // [property: FromHeader] string LoginDTO, // [property: FromBody] CriteriaDTO CriteriaDTO // ); // public override void Configure() // { // Post("/ItemListReport"); // AllowAnonymous(); // } // public override async Task ExecuteAsync(GetItemMasterReportParameters req, CancellationToken ct) // { // try // { // var LoginDTO = Newtonsoft.Json.JsonConvert.DeserializeObject(req.LoginDTO); // var result = await _itemBLL.GetItemMasterReport(req.CriteriaDTO, LoginDTO!, req.FirstNumber,req.MaxResult,req.Orderbyfield); // if (result == null || !result.Any()) // { // return await GB5Shared.ResponseStandard.Response.CreateEmptyResponse( CacheKeyLevel.NOT_REQUIRED,"No Data Found", 404); // } // return await GB5Shared.ResponseStandard.Response.CreateSuccessResponse(result, CacheKeyLevel.NOT_REQUIRED,null!); // } // catch (Exception ex) // { // return await GB5Shared.ResponseStandard.Response.CreateExceptionError(ex, CacheKeyLevel.NOT_REQUIRED,null!, ex.Message, 500); // } // } // } //}