DataService Filter

Hi, for some reason Field stop working after the update to 7.1. Is there a new way to get an image by name?

And why is ID not set when an image is uploaded thru backend?

    private File GetLitiumFile(string fileName)
    {
        using (var query = _dataService.CreateQuery<File>())
        {
            var items = query.Filter(x => x
                .Bool(b => b
                    .Must(m => m.Field(SystemFieldDefinitionConstants.NameInvariantCulture, "eq", fileName))
                    ));
            var existingFile = items.FirstOrDefault();
            return existingFile;
                }
            }

Litium version:7.1

That should work, what is the exception/error you are getting?

The ID is used for integrations and will be set when the integration is creating the file. The ID is unique for all files, the filename is only unique for the current folder.

Litium.Data.Queryable solved problem