I am using Entity Framework 6 in a WPF project and the initial migrations and database creation is all right and working. My problem is that I have been working on a local database on my machine, however when I try to connect to a remote database I get this error.
DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. MySqlException: Table 'db.tester' doesn't exist
This exception was originally thrown at this call stack:
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in ExceptionDispatchInfo.cs
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task) in TaskAwaiter.cs
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) in TaskAwaiter.cs
MySqlConnector.Core.ResultSet.ReadResultSetHeaderAsync(MySqlConnector.Protocol.Serialization.IOBehavior) in ResultSet.cs
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in ExceptionDispatchInfo.cs
MySqlConnector.MySqlDataReader.ActivateResultSet(System.Threading.CancellationToken) in MySqlDataReader.cs
MySqlConnector.MySqlDataReader.CreateAsync(MySqlConnector.Core.CommandListPosition, MySqlConnector.Core.ICommandPayloadCreator, System.Collections.Generic.IDictionary<string, MySqlConnector.Core.CachedProcedure>, MySqlConnector.Core.IMySqlCommand, System.Data.CommandBehavior, System.Diagnostics.Activity, MySqlConnector.Protocol.Serialization.IOBehavior, System.Threading.CancellationToken) in MySqlDataReader.cs
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in ExceptionDispatchInfo.cs
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task) in TaskAwaiter.cs
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) in TaskAwaiter.cs
The remote database is working as I can access it on MySql workbench. I have also tried to include Database.EnsureCreated() within the dbContext constructor but it is still not finding the database table. What am I missing?