Ejemplo n.º 1
0
        public (bool Valid, int?ID) ValidateLogin(string email, string password)
        {
            const string sql = @"
SELECT
    *
FROM
    Users
WHERE
    Email = @Email";

            var user = _db.Query(conn => conn.QuerySingleOrDefault <User>(sql, new { email }));

            if (user == null)
            {
                return(false, default);