Click here to Skip to main content
15,889,863 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
C#
public JsonResult UserLogin(Login d)
      {

          List<sp_customer_login_Result> Skill = new List<sp_customer_login_Result>();
          {
              Skill = db.sp_customer_login(d.Email.ToString()).ToList();

          }
          return new JsonResult { Data = Skill, JsonRequestBehavior = JsonRequestBehavior.AllowGet };

      }
  }


What I have tried:

Skill = db.sp_customer_login(d.Email.ToString()).ToList();

in this line i got a error-" the name db does not exixs in current context"
Posted
Comments
Er. Puneet Goel 6-May-16 8:24am    
Please check you connection string. As that contains the DB name.
Richard Deeming 6-May-16 8:32am    
The error is quite clear - you don't have a variable, field, property or type called db in scope.

Since we can't see where you think that variable should come from, we can't tell you how to fix the error.
F-ES Sitecore 6-May-16 9:37am    
Before you learn mvc I'd strongly suggest you learn the basics of c# first as you're going to struggle.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900