Organization of simple project

Someone asked on Stack Overflow:

I want to create a simple mvc application. It’s typical task and very simular with phpmyadmin. I have a table and a few operations delete, edit, create new row.

                Name  Gender Age   
[delete] [edit] Alex  Male   20 
[delete] [edit] Elza  Female 23 
                         [New person] 

When edit or New person clicked by user application show the following page

Name   [........]
Gender [........]
Age    [........]
            [Save]

I’m very new in asp.net and mvc, can anyone suggest a right project organization or give links to simular applications?

I posted the following answer, which was chosen as the accepted answer and received 1 upvote:

A few guide lines I like to stick with:

  1. Entities should map to database tables
    1. You may want to create ViewModels to show denormalized data.
  2. Actions should be verbs that you perform on your entities
  3. Always use Strongly Typed views, always
  4. Try to keep your controllers lean, less controller code = better
    1. If you need, move code into a “service” class that your controller consumes

Depending on your database choice, I’d probably use Linq-To-SQL to quickly generate my entities and I’d probably wrap them up in a simple repository class. If you using something besides SQL Server, I’d try Entity Framework.

If your scope starts getting bigger, you may want to swap out your generated entities and insert your own DTOs inbetween your MVC app and the database layer.


Originally posted on Stack Overflow — 1 upvotes (accepted answer). Licensed under CC BY-SA.

signed letter b

Dad. Geek. Gamer. Software developer. Cloud user. Old Car enthusiast.  Blogger.


Top Posts


profile for Nate on Stack Exchange, a network of free, community-driven Q&A sites
a proud member of the blue team of 512KB club
Thoughts, opinions, and ideas shared here are my own. © 2026 Nate Bross.