Click here to Skip to main content
15,886,724 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
Hi all,

I have the doubt regarding few things....

As i am completely new(less than 15 days age in MVC) to this ASP.net MVC concepts and due to lake of knowledge on some fundamental concepts in MVC, really distrubing my work... so,

Can any one clearly and simply explain me the things like,

1.When should we use "IEnumerable", "List"....

2.What is main use behind using the statement like
@model IEnumerable<Namespace.Models.ModelClasses>


3.What is main use of
public Virtual Classname Identifier{get; set;}


4.What is main use of
public IEnumerable<ClasseName> Identifier{get;set;}


5.What is main use of
public List<ClasseName> Identifier{get;set;}

I would be very thankfull to you...

Thanks in advance...
Posted
Updated 12-May-12 3:06am
v2
Comments
Sergey Alexandrovich Kryukov 12-May-12 22:39pm    
What is MVC-specific here? Are you asking just because you saw these pattern in some code samples?
No, it won't work for you. This is the same as showing integral sign and asking what is its use in quantum mechanic. :-)
--SA
P_A_1 14-May-12 1:07am    
:(

1 solution

I don't think "what is main use of" approach is productive enough to bother answering.

Besides, in the show patterns there is nothing specific to MVC, but more to general OOP; they are so fundamental or usual, that no use can be called "main". Besides, it looks you are too far behind in general OOP and programming. Maybe you are not ready to work with MVC at all, need to learn some programming first. Grab a manual, read it from the very beginning to the very end; do simple exercises on each chapter, try to understand all the ideas.

—SA
 
Share this answer
 
v2
Comments
VJ Reddy 12-May-12 23:25pm    
Good points. 5!
Sergey Alexandrovich Kryukov 13-May-12 0:34am    
Thank you, VJ.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900