Question: why use ienumerable in mvc?
Answer: IEnumerable is the base of the ICollection and IList interfaces (and many other). All these interfaces provide various functionalities and are useful in various cases. IEnumerable interface is used when we want to iterate among our classes using a foreach loop.