Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linq Query with byte[] Constant #33

Open
oliverw opened this issue Sep 11, 2010 · 0 comments
Open

Linq Query with byte[] Constant #33

oliverw opened this issue Sep 11, 2010 · 0 comments

Comments

@oliverw
Copy link

oliverw commented Sep 11, 2010

The following method will crash with an NotSupportedException("The constant for 'byte[]' is not supported") thrown at MongoQueryTranslator.cs:699. Any chance to get this to work or is this a limitation of MongoDb or BSON?

public Guid? GetUserIdByUsernamePassword(string Username, byte[] Password)
{
using (var db = ServiceLocator.Get())
{
var users = db.GetCollection();
var user = users.AsQueryable().Where(x => x.Username == Username && x.Password == Password).FirstOrDefault();

    if (user == null)
        return null;

    return user.Id;
}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant