Reputation: 4557
I am new to the MVC, when i create a new MVC 4 app, inside a model folder there is file name called AccountModels.
inside that i saw code that deals with databse.
public class UsersContext : DbContext
{
public UsersContext()
: base("DefaultConnection")
{
}
public DbSet<UserProfile> UserProfiles { get; set; }
}
Do i need to create a new EDMX model/ DataBase? or i can use this to generate Edmx model?
and there is no DB in that new project.
Upvotes: 0
Views: 88
Reputation: 93424
This is a code first model used for your Membership database. You can certainly use it for your own Data model as well, but you cannot use it as a basis for an EDMX model. You will have to create a separate EDMX file for that.
Code first and EDMX are not compatible.
Upvotes: 1