Stop Entity Framework from modifying database
If you want to use EF but never modify the database then you probably don't want code first. You probably want something more like database first.
http://blogs.msdn.com/b/adonet/archive/2011/03/15/ef-4-1-model-amp-database-first-walkthrough.aspx
Links from answer comments:
http://automapper.codeplex.com/
Getting Started with AutoMapper
edit: I misunderstood the goal, you should reference this answer where the following correct code was given:
If you don't want EF to create your database, you can disable the database initializer
Database.SetInitializer<MyContext>(null);
If you don't want EF to create your database, you can disable the database initializer:
public class SchoolDBContext: DbContext
{
public SchoolDBContext() : base("SchoolDBConnectionString")
{
//Disable initializer
Database.SetInitializer<SchoolDBContext>(null);
}
public DbSet<Student> Students { get; set; }
public DbSet<Standard> Standards { get; set; }
}
See http://www.entityframeworktutorial.net/code-first/turn-off-database-initialization-in-code-first.aspx