public async Task <User> FindByEmailPassword(string email, string password) { var filter = Builders <User> .Filter.Eq("Email", email); User user = await this._usersCollection .Find <User>(filter) .FirstOrDefaultAsync <User>(); LogCosmosDBRequestCharge(); if (user == null) { return(null); } bool passMatch = SecurityUtils.CheckMatch(user.Password, password); if (passMatch != true) { return(null); } else { return(user); } }