Click here to Skip to main content
12,750,710 members (36,807 online)
Rate this:
Please Sign up or sign in to vote.
See more: MVC3
Hi all,

I have the doubt regarding few things....

As i am completely new(less than 15 days age in MVC) to this 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 12-May-12 4:04am
Updated 12-May-12 4:06am
SAKryukov 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. :-)
P_A_1 14-May-12 1:07am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.

VJ Reddy 12-May-12 23:25pm
Good points. 5!
SAKryukov 13-May-12 0:34am
Thank you, VJ.

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

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170215.1 | Last Updated 12 May 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100