views:

26

answers:

0

I've got the following code:

UserLoginData userLoginData = _securitySoap.Login(username, password);
_repository = new SimpleRepository(SimpleRepositoryOptions.RunMigrations);
_repository.Add<UserLoginData>(userLoginData);
var queryResult = _repository.Exists<UserLoginData>(x => x.UserName == userLoginData.UserName);

The last line throws an ArgumentException with the following message:

System.ArgumentException: Type 'System.String[]' does not have a default constructor

When I check the database, it shows that the object has been persisted. Also, when I use Single instead of Exists, I get a valid object back. I'm confused why the Exists method does this.