Skip to content

EntityFramework query does not return anything but sql does #35

@Cossinus

Description

@Cossinus

None of these queries return anything with EF but using this not commented query in - for example - phpmyadmin it returns elements that I want.

var scores = await dbContext.Scores
.FromSqlRaw($"SELECT * FROM Scores WHERE PlayerId IN ({string.Join(", ", playerIds)}) AND PlayTime > TIMESTAMP(\"{date:yyyy-MM-dd}\", \"{date:HH:mm:ss}\")")
.ToListAsync();
/*var scores = await dbContext.Scores
.Where(s => playerIds.Contains(s.PlayerId) && s.PlayTime > date)
.ToListAsync();*/

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions