public static bool GetAccountByMobile(string mobile, int role) { string sql = "select COUNT(0) from Account (nolock) where IsDeleted=0 and Mobile=@mobile and Role=@role;"; return(DBAccess.ExecuteSql <int>(sql, new { mobile = mobile, role = role }) > 0); }
public static Account LoginByMobileOrEmail(string name) { string sql = "select * from Account (nolock) where IsDeleted=0 and ( Email=@name or Mobile=@name);"; return(DBAccess.GetEntityFirstOrDefault <Account>(sql, new { name = name })); }
public static Account GetModelByName(string Name) { string sql = string.Format(@"select [Mobile],[Email],[Password],[IsDeleted],[CreateDate],[CreateBy],[ModifyBy],[Role],[Id],[AccountName],[Mobile],[Email],[Password],[IsDeleted],[CreateDate],[CreateBy],[ModifyBy],[Role],[Id],[AccountName] from {0} (nolock) where Name=@Name", TableName); return(DBAccess.GetEntityByName <Account>(sql, Name)); }
public static bool GetAccountByEmail(string email, int role) { string sql = "select COUNT(0) from Account (nolock) where IsDeleted=0 and Email=@email and Role=@role;"; return(DBAccess.ExecuteSql <int>(sql, new { email = email, role = role }) > 0); }