public Person FindPersonByEmail(String email, bool? isCurrentlyEmployed = null)
{
var sql = Sql.Builder.Append("select top 1 * from people")
.Append("where email = @0", email);
if (isCurrentlyEmployed.HasValue)
{
sql.Append("and isCurrentlyEmployed = @0", isCurrentlyEmployed);
}
var person = database.SingleOrDefault<Person>(sql);
return person;
}
}