Technical Issues and Solutions in ASP.NET WEBAPI

Error:-{"Invalid object name 'dbo.tbllogins'."}
Solution:= This is just an example, you apply your own table name to fix this error. Please see the following files to understand about the error:

FileName: tbllogin.cs

public class tbllogin
public int userid { get; set; }
public string username { get; set; }
public string email { get; set; }
public string password { get; set; }
public int contactno { get; set; }

FileName: Userdetailscontroller.cs

public class UserDetailsController : ApiController
InfoDBContext objdbcontext = new InfoDBContext();
public IEnumerable Get()
if (objdbcontext.Database.Connection.State == System.Data.ConnectionState.Closed)
return objdbcontext.tbllogins.ToList();

If you run the above api,then you will receive following error.
{"Invalid object name 'dbo.tbllogins'."}
So how will you fix it? Actually the compiler is getting confused between your api tablename and sqlserver tablename. So you have to give same tablename as sqlserver tablename.For eg:- in my case i need to include Table in tbllogin.cs