using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Opsoft.NetCore.O3App.Domain.UnitOfWork.BaseData.IServices; using Opsoft.NetCore.O3App.Domain.UnitOfWork.BaseData.Model; using Opsoft.NetCore.O3App.Shared; using Opsoft.NetCore.O3App.WebApi.Models; using System.Collections.Generic; using System.Threading.Tasks; namespace Opsoft.NetCore.O3App.WebApi.Controllers.BaseData { [Authorize] public class AssetinventoryController : BaseApiController { private readonly IAssetinventoryServices _service; public AssetinventoryController(IMapper mapper, ILogger logger, IAssetinventoryServices Service) : base(mapper, logger) { _service = Service; } [HttpGet] public async Task>> GetAllAssetinventoryUnRead(int pageNum, int pageCount) { var data = new { pageNum = pageNum, pageCount = pageCount }; return await TryProcess(async input => { return await _service.GetAllAssetinventoryUnRead(data.ToJson()); }, data); } } }