public async Task <bool> HashtagExists(string hashtag) { await base._dBContext.OpenDBConnectionAsync(); using (base._dBContext.DbConnection) { return(await base._dBContext.DbConnection.ExecuteScalarAsync <int>( DapperHelperQueries.Exists("Hashtag", "Content"), new { Value1 = hashtag } ) == 1); } }
public async Task <bool> UserReactionExistsAsync(int shoutId, int userId) { await base._dBContext.OpenDBConnectionAsync(); using (base._dBContext.DbConnection) { return(await base._dBContext.DbConnection.ExecuteScalarAsync <int>( DapperHelperQueries.Exists("ShoutReaction", new string[] { "ShoutId", "UserId" }), new { Value1 = shoutId, Value2 = userId } ) == 1); } }
public async Task <bool> EmailExistsAsync(string email) { await base._dBContext.OpenDBConnectionAsync(); using (base._dBContext.DbConnection) { return(await base._dBContext.DbConnection.ExecuteScalarAsync <int>( DapperHelperQueries.Exists("AppUser", "Email"), new { Value1 = email } ) == 1); } }