Skip to content

Use of Context.SaveChanges() in Create() method of EF Repository #10

Closed
@jersiovic

Description

Related to Create(T entity) method within EF repository to what extend is useful to use Context.SaveChanges() within Create method?
I mean, I understand you use it for having available for next queries the entitity you just added. But it is an expesive price for having this commodity. In your opinion is this commodity really a need?
I mean in Orchard 1.8 the current code that consumes Repository really harness this commodity?
How much code? Can you point me an example? Will it be difficult to change that code that adds and consumes data to delegate on it the decission of when to call context.SaveChanges()?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions