mardi 26 novembre 2019

ASP.Net WeB API not able to fetch data from SQL Server but creates Context Model Successfully

 The following cs file was generated successfully when connected to the SQL database.

    namespace UserLogin.Models
    {
    public partial class User
    {
    public int UserId { get; set; }
    public string UserName { get; set; }
    public string Email { get; set; }
    public string Password { get; set; }
    }
    }

But, when it comes to the API http://localhost/api/User, it throws 500 Error.

Is the issue related to some permissions to be set on the database end for fetching data?

Please help. Thanks.




Aucun commentaire:

Enregistrer un commentaire