Consider using Code First Migrations to update the database.Please help me to fix this.

Discussion of issues, suggestions and bugs of LINQ Insight, Visual Studio add-in for design-time executing LINQ statements, that simplifies debugging LINQ
Post Reply
punnoose
Posts: 1
Joined: Wed 19 Nov 2014 09:18

Consider using Code First Migrations to update the database.Please help me to fix this.

Post by punnoose » Wed 19 Nov 2014 09:26

I am getting an error when i ran My Linq query using linq insight. please do help me to fix this issue as early as possible..I am a newbe into linq insight

Message: The model backing the 'DbContext' context has changed since the database was created. Consider using Code First Migrations to update the database (http://go.microsoft.com/fwlink/?LinkId=238269).
Type: System.InvalidOperationException
Source: EntityFramework
Site: InitializeDatabase
Stack Trace:
at System.Data.Entity.CreateDatabaseIfNotExists`1.InitializeDatabase(TContext context)
at System.Data.Entity.Internal.InternalContext.<>c__DisplayClassf`1.<CreateInitializationAction>b__e()
at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action)
at System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization()
at System.Data.Entity.Internal.LazyInternalContext.<InitializeDatabase>b__4(InternalContext c)
at System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input)
at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action)
at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase()
at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType)
at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize()
at System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext()
at System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider()
at System.Linq.Queryable.Where[TSource](IQueryable`1 source, Expression`1 predicate)
at Query.GetQuery(Object[] args)
at #=q8OCRrNDS5W7Dwe8w0axG5x0hHmkjURwIpMaaAGRWLG2CI$SIQrkrweFguJeWJ_$RJkxt6UbvGy0CSLW6Supp1Q==.#=qfDlN85b57Fwf1A570s5yjRhPK0gGyG1F41kEIYnETPk=.#=qct57tQg1UDvSGuHyZQRhBw==()
at #=q8OCRrNDS5W7Dwe8w0axG5x0hHmkjURwIpMaaAGRWLG2CI$SIQrkrweFguJeWJ_$RJkxt6UbvGy0CSLW6Supp1Q==.#=q5$BP3y308vnL5JX0b$THPWTXbYet9L06LR6iJYA1hsQ=.#=q3rA1$xx5R4F5Jng1jdu5BOHrnJ2hYKRd7XpFNs1L07AR43XlCDTml8tzx_9J9Sf9()

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Consider using Code First Migrations to update the database.Please help me to fix this.

Post by MariiaI » Wed 19 Nov 2014 14:17

Please check your project without using LINQ Insight. Does it work correctly, without any errors, at runtime?
If yes, please specify the following details:
- the version of LINQ Insight;
- the LINQ query you are trying to perform;
- the version of EF;
- the type of the project, etc.;

Please also send us a small test project, so that we are able to reproduce this issue in our environment and find the solution for you in a shortest time.

Post Reply