Skip to content

Can I convert int to string type? #52

@winsonet

Description

@winsonet

I want to do a dynamic field search, so I need to convert all the fields to string for global search, like below:

var expectedResult = _context.Blogs.Select(b => ((string)((int)(b.BlogId))).Contains("key"));
var result = _context.Blogs.AsQueryable().Select("(string((int)BlogId)).Contains(@p)");

but I know that doesn't work, so is there another way I can do ?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions