About SubSonic 3 (ActiveRecord) Queries

99 Views Asked by At

I'm new to SubSonic (v.3 ActiveRecord) also I'm not interested in linq before and I couldn't find enough document or samples for queries.

For example I don't know how to login a member with known fields;

Member.Exists(x => x.Email == Email); <=== How to write this for two fields? OR

var Member = Member.SingleOrDefault(x => x.Email == Email); <=== How to write this for two fields?

Any documents, tutorials or samples would be great! Thanks!

1

There are 1 best solutions below

0
Kaner TUNCEL On

OK, I've found some solution for my question at least it's a start.

var Member = Members.SingleOrDefault(x => x.Email == Email && x.Password == Password);