I\'m using entity framework code first to create my tables. Please note - create the tables, not the DB, since I\'m working on a hosted environment and I don\'t have a user
Ok, for me issue was that I had a table called dbo.UserState
and in C# EF was trying to access dbo.UserStates
because of pluralization.
The solution was to put Table
attribute above class and specify the exact table name:
[Table("UserState")]
public class UserState
{
[Key]
public int UserId { get; set; }
}