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

Is it possible to have a generic implementation of UpdateAll? #86

Open
mateusmcg opened this issue May 23, 2016 · 3 comments
Open

Is it possible to have a generic implementation of UpdateAll? #86

mateusmcg opened this issue May 23, 2016 · 3 comments

Comments

@mateusmcg
Copy link

Is there a way that i can use the UpdateAll generically? For example:

Let's suppose i have a BaseRepository that receives a list of entities of type T and i want to update all properties of the entire list (In other words a generic BulkUpdate).

I'm trying to do something like this:

EFBatchOperation.For(Context, this.entities.Set<T>()).UpdateAll(<List T goes here>, e => e.ColumnsToUpdate(p => p.<Get All Props Here>));

But, obviously, no success so far.

Sorry if this is a dumb question, but i could find nothing related so far and i really need a light here.

@RubberChickenParadise
Copy link

UpdateAll is all ready a generic acting on TContext, T with a limit on T being a class.

Do you have a larger code sample of what you are trying to do?

@AleksandarGajic
Copy link

@mateusmcg did you figure out how to create a generic UpdatedAll?

@RudeySH
Copy link

RudeySH commented Feb 8, 2018

Are you looking for an UpdateAll implementation that updates all columns? If so, see #106 for further discussion.

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

No branches or pull requests

4 participants