Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

EF: Invalid object name 'dbo.Users'

$
0
0

Hi guys.  I'm having some trouble using the Entity Framework and was hoping someone has seen this.  I've been all over Google, but nothing has worked.  I feel like it must be some kind of configuration I'm missing or something.

The exception is a System.Data.EntityCommandExecutionException and the message is "An error occurred while executing the command definition.  See the inner exception for details."  The inner exception is: "Invalid object name 'dbo.User'."  I realize this seems to indicate that it can't find the "dbo.User" table, but it exists in my database has the "dbo" schema.  I'm using the "sa" account to connect. 

I created the Entity Model and let it generate the create SQL for me.  I ran the script and created my tables in the database.  (only two tables)  When I "validate" from the entity model, there are no errors.  I have refreshed the model from the database and it works with no errors.  The table mappings look good.

I get the error when I tried to retreive data or "SaveChanges."

Everything I've seen while searching seems to indicate people have problems with the plural form of the table name (I'm not having this problem) and people having trouble getting the EF to automatically create their database. (I already have the database)

Any ideas?

Thanks!
Craig 


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>