using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using UnivateProperties_API.Model.Users; using UnivateProperties_API.Repository; namespace UnivateProperties_API.Controllers.Users { [Route("api/[controller]")] [ApiController] public class NonRegIndividualController : ControllerBase { private readonly IRepository _Repo; public NonRegIndividualController(IRepository rp) { _Repo = rp; } [HttpGet] public IActionResult Get() { var roles = _Repo.GetAll(); return new OkObjectResult(roles); } [HttpGet("{id}")] public IActionResult Get(int id) { return new OkObjectResult(_Repo.Get(x => x.WeekId == id)); } } }