Skip to content

SaveChangesAsync() doc page #25

@ajcvickers

Description

@ajcvickers

Moved from dotnet/efcore#12751 posted by @erictrigo

Check out: https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.dbcontext.savechangesasync?view=efcore-2.1

Says signature for SaveChangesAsync is

public virtual System.Threading.Tasks.Task<int> SaveChangesAsync (System.Threading.CancellationToken cancellationToken = null);

If you try overriding SaveChangesAsync using the above example, it'll give you the following error:

image

Using default(CancellationToken) instead of null solves the issue:
public override async Task<int> SaveChangesAsync(CancellationToken cancellationToken = default(CancellationToken))

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