ubeac / ubeac-api

Source of uBeac .NET Core packages
3 stars 2 forks source link

Add Entity Options to Repository #98

Closed ilhesam closed 2 years ago

ilhesam commented 2 years ago

Issue: We needed to change the action names when calling create, update and delete methods of repository. For example, in the Enable() method, we call the Update() method, but action name is Update instead of Enable.

Solution: Add entity options to Create(), Update() and Delete() methods of repository that we can change the value of the action name.

await Update(entity, new UpdateEntityOptions { ActionName = nameof(Enable) }, cancellationToken);

Default value of options is null.

await Update(entity, cancellationToken: cancellationToken);