Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am very new to ASP.Net MVC. I am planning to create on website for classifieds.

So I would like to get url as following
(http://mysitename.com/stateName/Place/Furniture/34)



From admin panel I should able to create StateName,Place, Category(eg. Furniture)



I am planning to start it as code-first approach of Entity Framework.


? Which all are the controllers i have to create
? What data I have to create inside model
? Can I create Folders under the project to keep Place and Category


So please guide me to create this application with your valuable suggestion.

Thanks in Advance.
Posted
Updated 28-Dec-14 3:32am
v2

1 solution

You are out for learning a lot of things. So all the best for learning MVC. :)

1- Now for your queries in the question, we cannot provide you the entire architecture for this project. But keep in mind to learn and implement the architecture so that the project is loosely coupled so that it would be easy for maintainability, not only for this project for any project you do in future.

2-When you choose and create a new ASP.NET MVC project with a name, it creates a solution with a web project (MVC project) in it.

3-That project will have Model Controller & Views folder already. Other than these, the web project will have App_Start, Filters folder, Global.asax(Start or heart of the web proj.) and Web.config where all the connection strings to the database and all the Application Configurations will be there.

4-For your requirements, you should create another project inside the solution and name as "YOUR PROJECT NAME.Core", which will contain all the database enitity/classes, since you will be using Code first approach, then all the enitity classes you will be creating will be inside this project inside a folder named "Entities". In this project the Migrations will also be done. So, that the Web Project will not be dependent on the Domain Entities or the Db operations. For this follow up this like:- ASP.NET MVC Controller Dependency Injection for Beginners[^]

5-Your third question to place folder under the project for Place and Category. For this I think this should be table inside the database so create classes inside the Core. You should use the Web Project mostly for the presentation purposes. Model folder should contain the View Models or the Models/.cs files used for the presentation/viewpages.

I hope you get what I wanted to explain.
Post back any queries if any.
Hope this helps .
Thanks.
 
Share this answer
 
Comments
Dhaneshmon 28-Dec-14 12:37pm    
Thank you Suraj. Me completed one video tutorial of ASP.Net MVC.
Thanks to share "MVC Controller Dependency Injection for Beginners"..
For above implementation created each area as states. Expecting more help from your side Suraj.. Thanks once again.
[no name] 28-Dec-14 12:48pm    
Sure any time dear. You can post me questions anytime & I would love to help you anyway I can..:)
If this has helped you you can accept else not.
Thanks.
Post queries anytime dear. :)

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