denis-ivanov / EntityFrameworkCore.ClickHouse

ClickHouse provider for Entity Framework Core.
https://clickhouse.tech/
17 stars 3 forks source link

Incorrect data when get data #59

Open navnforfun opened 5 hours ago

navnforfun commented 5 hours ago

I had successfull scaffold model by EntityFrameworkCore.ClickHouse package and I use this code to get data from my clickhouse database

[HttpGet]
public async Task<ActionResult<IEnumerable<User>>> GetUsers()
{
    return await _context.Users.OrderBy(u => u.Timestamp).ToListAsync();
}

The result was

[ { "id": 1, "name": "Clickhouse first", "timestamp": "2024-09-21T10:15:35Z" }, { "id": 1, "name": "Clickhouse first", "timestamp": "2024-09-21T10:15:35Z" }, { "id": 0, "name": "string", "timestamp": "2024-09-21T10:24:11Z" }, { "id": 0, "name": "string", "timestamp": "2024-09-21T10:24:11Z" }, { "id": 0, "name": "string", "timestamp": "2024-09-21T10:24:11Z" }, { "id": 0, "name": "string", "timestamp": "2024-09-21T10:24:11Z" }, { "id": 0, "name": "string", "timestamp": "2024-09-21T10:24:11Z" } ]

My real data was

id name timestamp 0 hello world 2024-09-21 11:53:01 0 third 2024-09-21 11:53:46 0 hello world 2024-09-21 11:53:01 0 string 2024-09-21 10:24:11 1 Clickhouse first 2024-09-21 10:15:35 1 Clickhouse second 2024-09-21 10:15:35

denis-ivanov commented 5 hours ago

Please, attach all scripts and command line commands