using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using wispro.sp.entity; namespace wispro.sp.api.Controllers { [Route("api/[controller]/[action]")] [ApiController] public class AppealController : ControllerBase { spDbContext Context; public AppealController(spDbContext context) { Context = context; } public List GetAppealTypes() { return Context.AppealTypes.ToList(); } public List GetInputField(int appealTypeId,int state) { return Context.InputFields .Where(ip => ip.AppealTypeId == appealTypeId && ip.AppealState == state) .Include(p=>p.SelectValues) .ToList(); } } }