-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
questionFurther information is requestedFurther information is requested
Description
Ask a question
Hello,
If you have a create command without any return type the method is generated as async, however doesn't await or complete any task (as below)
public async Task Handle(CreateItemCommand request, CancellationToken cancellationToken)
{
var item= new Item
{
Id = request.Id,
Value = request.Value
};
_repository.Add(item);
}
Would it be possible to change methods like these to remove the async keyword, and return Task.CompletedTask ?
According to AI benchmarks its considerably quicker if we return a task.
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested
