I m getting network error
unable to understand what is the error
- public class UserModel
- {
- public int UserId { get; set; }
- public String FullName { get; set; }
- public String UserEmail { get; set; }
- public String Password { get; set; }
- static string ConnectionString = "Data Source=DESKTOP-O00000/SQL2017;Initial Catalog=nsroute;Integrated Security=True";
- public static IEnumerable<UserModel> GetUserDetails()
- {
- List<UserModel> userdetailslist = new List<UserModel>();
- using (IDbConnection con = new SqlConnection(ConnectionString))
- {
- if (con.State == ConnectionState.Closed)
- con.Open();
- userdetailslist = con.Query<UserModel>("GetUserDetails").ToList();
- }
- return userdetailslist;
- }
- }