MySQL Forums
Forum List  »  MySQL for Visual Studio

1146 error Table does not exist EF 6 add schema.schema.tablename prefix
Posted by: efren gtz
Date: November 25, 2020 10:56AM

Hi there.
I am using a EF6 with vs 2019 and Mysql 8.0
when i generated my model from an existent database all is fine but when i do a select with linq an error message appear

" 1146 the table cursomvc.cursomvc.user doesn't exist " I supposed the Entity FramweWor has put the prefix schema twice

the database is working ok, the database exists and the table too, but
cursomvc.cursomvc.user table no exist i think is custommvc.user i dont know why add twice schema.schema

this my code



public ActionResult Enter(string user, string password)
{
try
{
using (cursomvcEntities db = new cursomvcEntities())
{
var lst = from d in db.user
where d.email == user && d.password == password && d.idstate == 1
select d;
if (lst.Count() > 0 )
{
user Ouser = lst.First();
Session["User"] = Ouser;
return Content("1");
}
else
{
return Content("Usuario inv√°lido :( ");
}
}
}
catch (Exception ex)
{
return Content("Ocurrió un error :( " + ex.Message);
}
}

Options: ReplyQuote


Subject
Views
Written By
Posted
1146 error Table does not exist EF 6 add schema.schema.tablename prefix
213
November 25, 2020 10:56AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.