Ejemplo n.º 1
0
    public async Task <int> UpdateDeleteAtAsync(MessageHistoryFindDto findDto, DateTime dateTime)
    {
        var where = findDto.ToDictionary();

        var query = await _queryService
                    .CreateMySqlFactory()
                    .FromTable(TableName)
                    .Where(where)
                    .UpdateAsync(new { delete_at = dateTime });

        return(query);
    }
Ejemplo n.º 2
0
    public async Task <int> DeleteMessageHistoryAsync(MessageHistoryFindDto findDto)
    {
        var where = findDto.ToDictionary();

        var query = await _queryService
                    .CreateMySqlFactory()
                    .FromTable(TableName)
                    .Where(where)
                    .DeleteAsync();

        return(query);
    }
Ejemplo n.º 3
0
    public async Task <IEnumerable <MessageHistory> > GetMessageHistoryAsync(MessageHistoryFindDto findDto)
    {
        var where = findDto.ToDictionary();

        var query = await _queryService
                    .CreateMySqlFactory()
                    .FromTable(TableName)
                    .Where(where)
                    .GetAsync <MessageHistory>();

        return(query);
    }