public List <CustomerList> GetAllCustomer() { List <CustomerList> custList; using (var ctx = new db_onlineStoreEntities()) { custList = ctx.sp_getAllUser1().ToList <CustomerList>(); } return(custList); }
public string RegisterCustomer(string email, string password) { string response = "success"; if (email == null && password == null) { response = "invalid data"; } else { using (var ctx = new db_onlineStoreEntities()) { int num; num = ctx.registerCustomer(email, password); response = num.ToString(); } } return(response); }