public Guid?GetFirstPurchaseIdForSoloOf(string email) { AuthQueriesCommands AuthCQ = new AuthQueriesCommands(); var accountObject = AuthCQ.GetAccountByEmail(email); if (accountObject != null) { PurchaseRecordQueriesCommands prCQ = new PurchaseRecordQueriesCommands(); return(prCQ.GetUnUsedSoloPurchaseRecordOf(accountObject).First().Id); } else { return(null); } }
public int CountOfSolosCanBeCreatedBy(string userEmail) { PurchaseRecordQueriesCommands purchaseCQ = new PurchaseRecordQueriesCommands(); AuthQueriesCommands AuthCQ = new AuthQueriesCommands(); Account account = AuthCQ.GetAccountByEmail(userEmail); if (account != null) { var GetListOfUnUsedPurchase = purchaseCQ.GetUnUsedSoloPurchaseRecordOf(account); //Returning the count of the unused purchase of Eps for the user return(GetListOfUnUsedPurchase.Count); } else { //No Account Found return(0); } }