public async Task ExecuteAsync(Shared.PostId postId) { using (var connection = this.connectionFactory.CreateConnection()) { await connection.ExecuteAsync( Sql, new { PostId = postId.Value }); } }
protected bool Equals(PostId other) { if (!object.Equals(this.Value, other.Value)) { return(false); } return(true); }
public async Task <bool> ExecuteAsync(UserId userId, Shared.PostId postId) { userId.AssertNotNull("userId"); postId.AssertNotNull("postId"); using (var connection = this.connectionFactory.CreateConnection()) { return(await connection.ExecuteScalarAsync <bool>( Sql, new { PostId = postId.Value, UserId = userId.Value })); } }