EntityFrameworkCore.ClickHouse
EntityFrameworkCore.ClickHouse copied to clipboard
Incorrect data when get data
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