Skip to content

Question about saving #6

Closed
Closed
@localhostPIB

Description

@localhostPIB

Why does the class Repository.cs have the method
AddAsync an Add Synchron and then Savechanges Asynchronously ?

public async Task AddAsync(T entity)
{
_dbContext.Set().Add(entity);
await _dbContext.SaveChangesAsync();
return entity;
}

Shouldn't both be Async ?

Greetings

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