P0_TrevorGraham/StoreApplication/StoreMain/Logic/StoreSession.cs
/// <summary>
/// Attempts find Customer with given username in database. If successful, assigns the Customer as the signed in user and returns true; otherwise, returns false
/// </summary>
/// <param name="username"></param>
/// <returns></returns>
Attempts find Customer with given username in database. If successful, assigns the Customer as the signed in user and returns true; otherwise, returns false
Attempts find Customer with given username in database . If successful assigns the Customer as the signed in user and returns true ; otherwise returns false
public bool AttemptLogin(string username){        
            Customer loggingIn = db.Customers.SingleOrDefault(x => x.Username == username);
            currentCustomer = loggingIn;
            return currentCustomer != null;
        }
public bool AttemptLogin ( string username ) { Customer loggingIn = db . Customers . SingleOrDefault ( x => x . Username == username ) ; currentCustomer = loggingIn ; return currentCustomer != null ; }
Attempts find Customer with given username in database.
Attempts find Customer with given username in database .
// return false;
None
username
string
None