I have read few articles on IOC and Unity and got my self confused :(
So going back to basics can some one tel me what the below code does?
private IStud
In IoC you need to register the interface and a class which is implementing the interface. So once you register then whenever you have signature like above IoC will automatically create an instance of IStudent implemented class and inject it to the object while initializing the controller. It saves the time and efforts to declare the members. In above case you just have one to declare, but it could be more in numbers and those all could need few more instances to pass to the controller. Once we register those all correctly IoC do its work thereafter. Infact we can decide the Scope/Lifetime of the injected members. It can be PerInstance/Per Request/ Or Singleton.
There are saveral IoC frameworks available its up to you which one you want to go with.