Hello every one
I am new in
.net MVC3
I have made a connection string in Web.config file, the connection is successfully created. below is my connection code
<add name="StoreDB" connectionString="Data Source=AMIT-PC;Initial Catalog=Store;User ID=sa;Password=****;Integrated Security=False"
providerName="System.Data.SqlClient" />
After that i created
DBConfig.cs
class file for database table connection below is my code
public class Store : DbContext
{
public Store()
{
}
public DbSet<RegisterModel> myapp { get; set; }
public DbSet<Application> ApplicationFormModels { get; set; }
}
There are basically two model i have created. First is RegisterModel and Seconds is Application model. When I run this code the error occured
The model backing the context has changed since the database was created.
When I use only one
DbSet<RegisterModel>
than the table is successfully created and all the CURD operation are successfully done but error occured when i create more than oneDbSet
.Below is the screenshots
looking forward for your inputs
Thanks in Advance