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 YearIds{ get; set; }
}
The question is: can I keep IEnumerable
or it should be List
?
What is better practice and why?
No comments:
Post a Comment