c# - ASP.NET Project Clone from Git Hub has broken database, but not from ZIP file from Google Drive -


i have asp.net project working on udemy class. trying familiarize myself git hub after evening of working on project, push remote repository. when build , run application on machine @ home runs perfectly. however, when use computer @ work clone project git hub, , run it, project build, when press link leads page requires database error controller class '

the model backing 'applicationdbcontext' context has changed since database created. consider using code first migrations update database (http://go.microsoft.com/fwlink/?linkid=238269).

so use nuget package manager 'update-database' , receive following error.

cannot find object "dbo.movies" because not exist or not have permissions.

if download zip file git hub receive same errors, put project on google drive , downloaded work computer , works fine. i'm not sure problem be, why movies database not being built. perhaps did incorrectly while pushing project computer git hub? checked sql server object explorer, other database tables there(dbo.customers), not dbo.movies. here code dbcontext class:

public class applicationdbcontext : identitydbcontext<applicationuser> {     // add customers table database     public dbset<customer> customers { get; set; }     // add movies table database     public dbset<movie> movies { get; set; }      public applicationdbcontext()         : base("defaultconnection", throwifv1schema: false)     {      }      public static applicationdbcontext create()     {         return new applicationdbcontext();     } } 

i did search , tried turning off db initializer, see happen, dbo.movies still comes missing. files google drive download , github clone seem match up. i'm not sure direction head here. thank provided.

answering question close down. project missing .mdf file because, mason said, 'database files aren't committed source code control.' i'll keep in mind on. appreciate mason!


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -