Waste/Waste.Web.Entry/Pages/Device/Detail.cshtml.cs

25 lines
665 B
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
2021-09-30 13:53:10 +08:00
using Waste.Application;
namespace Waste.Web.Entry.Pages.Device
{
public class DetailModel : BaseModel
{
2021-09-30 13:53:10 +08:00
public DeviceDetailS2Dto data = new DeviceDetailS2Dto();
private readonly IDeviceService _deviceService;
public DetailModel(IDeviceService deviceService)
{
2021-09-30 13:53:10 +08:00
_deviceService = deviceService;
}
public async Task OnGetAsync(Guid id)
{
data = await _deviceService.DeviceDetailAsync(id);
}
}
}