using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Waste.Application;
using Waste.Domain;

namespace Waste.Web.Entry.Pages.Trash
{
    public class EditTypeModel : BaseModel
    {
        private readonly IWasteService _wasteService;
        public W_WasteType data = new W_WasteType();
        public EditTypeModel(IWasteService wasteService)
        {
            _wasteService = wasteService;
        }
        public async Task OnGetAsync(Guid? id=null)
        {
            if(id.HasValue && id.Value != Guid.Empty)
            {
                data = await _wasteService.DetailTypeAsync(id.Value);
            }
        }
    }
}
