Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
I need to build web site by .net web technology asp.net mvc USING C#

But i confuse

What is best for build Web site Implementation by MVC

Using Entity framework(build database and create modules automatic by EF)

OR

Implementing web site by using Code First ?

What I have tried:

what scenario using code first or entity framework
Posted
Updated 13-Jan-17 17:45pm

 
Share this answer
 
v2
Code First is a mode that Entity Framework works in. It is something to implement a web site. Entity Framework is an Object Relational Mapping tool. It automates a lot of the work to save data model objects to a database and reconstitute them back into objects from the database.

Entity Framework can be used in lots of different application types, including ASP.NET/MVC.

ASP.NET/MVC is used to write websites.

There is no "best", there is only what's more appropriate given the situation and requirements.
 
Share this answer
 
Comments
ahmed_sa 14-Jan-17 7:46am    
OK Now if i build web site by using asp.net mvc what i select suppose i have 50 tables what i select to work entity framework or code first
Dave Kreskowiak 14-Jan-17 12:59pm    
Again, Code First is a mode that Entity Framework runs in. They are not separate frameworks doing the same thing.

If you've never done any Entity Framework stuff before, I would not recommend going straight to defining 50 tables in it and jumping in. Get a couple of books on Entity Framework and Code First first and work through them. You're going to need it.

You don't have to use Entity Framework. You can use any ORM library you want. You can even skip using an ORM and just write your own database handling code yourself.

There's a ton of different options. What's going to work best for you is up to you and you're requirements. There is no "best".

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