If you don’t want to use migrations but in the same time you want EF to create database for you, you just need to set correct database initializer:
Database.SetInitializer<YourContextType>(new CreateDatabaseIfNotExists<YourContentType>());
Related Contents:
- CREATE DATABASE permission denied in database ‘master’ (EF code-first)
- Entity Framework – Is there a way to automatically eager-load child entities without Include()?
- Can you create sql views / stored procedure using Entity Framework 4.1 Code first approach
- Entity framework 4.3 run migrations at application start
- Entity Framework Code First – two Foreign Keys from same table
- Entity Framework: One Database, Multiple DbContexts. Is this a bad idea? [closed]
- Reset Entity-Framework Migrations
- The model backing the context has changed since the database was created
- Unique Constraint in Entity Framework Code First
- how to use views in code first entity framework [closed]
- Multiple DB Contexts in the Same DB and Application in EF 6 and Code First Migrations
- EntityFramework code-first custom connection string and migrations
- How to delete and recreate from scratch an existing EF Code First database
- ASP.NET MVC3 and Entity Framework Code first architecture
- Entity Framework DateTime and UTC
- Using Entity Framework (code first) migrations in production
- Does Entity Framework Code First support stored procedures?
- There is already an object named in the database
- Why use ICollection and not IEnumerable or List on many-many/one-many relationships?
- Validation failed for one or more entities while saving changes to SQL Server Database using Entity Framework
- why remove-migration run my app?
- Entity Framework code first unique column
- SQL Server Express connection string for Entity Framework Code First
- Entity Framework Code First – No Detach() method on DbContext
- Self-referencing many-to-many recursive relationship code first Entity Framework
- MVC3 and Code First Migrations – “model backing the ‘blah’ context has changed since the database was created”
- Debug code-first Entity Framework migration codes
- EF4 Code First: how to add a relationship without adding a navigation property
- Entity Framework loading child collection with sort order
- Possible to default DateTime field to GETDATE() with Entity Framework Migrations?
- Understanding ForeignKey attribute in entity framework code first
- Fluent API, many-to-many in Entity Framework Core
- How to configure ProviderManifestToken for EF Code First
- Mapping Database Views to EF 5.0 Code First w/Migrations
- GUID COMB strategy in EF
- EF Migrations: Rollback last applied migration?
- How can I disable migration in Entity Framework 6.0
- Enable Migrations with Context in Separate Assembly?
- EF migration for changing data type of columns
- Using MySql with Entity Framework 4 and the Code-First Development CTP
- Entity Framework CTP 4 – Code First Custom Database Initializer
- ALTER TABLE DROP COLUMN failed because one or more objects access this column
- MVC 5 Seed Users and Roles
- EF5 Code First – Changing A Column Type With Migrations
- Value cannot be null. Parameter name: entitySet
- Unable to create an object of type ‘[DBContext’s Name]’. For the different patterns supported at design time [closed]
- Migrations in Entity Framework in a collaborative environment
- Entity Framework initialization is SLOW — what can I do to bootstrap it faster?
- LINQ to Entities does not recognize the method ‘System.String ToString()’ method in MVC 4
- How do I use Entity Framework in Code First Drop-Create mode?