Let's say that I have
[HttpPost("some/route")]
public void AddSomething([FromBody] QueryParameter parameter){
DoSomething();
}
and my parameter is:
public class QueryParameter {
public int ElementId { get; set; }
public IEnumerable<int> YearIds{ get; set; }
}
The question is: can I keep IEnumerable<int>
or it should be List<int>
?
What is better practice and why?