Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leverage LINQ while selecting columns from Table #58

Closed
agwanyaseen opened this issue Jan 13, 2023 · 2 comments
Closed

Leverage LINQ while selecting columns from Table #58

agwanyaseen opened this issue Jan 13, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@agwanyaseen
Copy link

Feature request

Is your feature request related to a problem? Please describe.

Yes, Currently while selecting columns from database we have to pass column names as magic string comma sperated in Select method.
This is error prone, even if we miss a letter unwillingly.

Describe the solution you'd like

We can leverage the linq while selecting columns (check below code for refrence)

var user = await client.Table<User>().Select(x => new { x.Username,x.Data }).Get();

Even if our column name changes in db table, we will have to just update the value in Column Attribute.
It will also be provide type safety.

Describe alternatives you've considered

No alternative

Additional context


@agwanyaseen agwanyaseen added the enhancement New feature or request label Jan 13, 2023
@acupofjose
Copy link
Contributor

I'll look into this!

@acupofjose
Copy link
Contributor

@agwanyaseen this is available in v3.1.0 - Thanks for the feature request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants