public async Task <ToDoItem> GetByIdAsync(int id) { var meta = new SafeCallServiceLogMetadata( this.headerAccessor.CorrelationId, typeof(ToDoRepository), nameof(this.GetByIdAsync)); var command = new SafeCallServiceQuery <ToDoItem>( this.SimulatedDbCall, meta); return(await this.safeCallService.CallAsync(command)); }
public void Construct_Successfully() { this.Metadata = new SafeCallServiceLogMetadata(Guid.NewGuid(), typeof(SafeCallServiceCommandUnitTests), "Unit Test"); this.Command = new SafeCallServiceCommand(() => Task.CompletedTask, this.Metadata); }
public void Construct_Successfully() { this.Metadata = new SafeCallServiceLogMetadata(Guid.NewGuid(), typeof(SafeCallServiceQueryUnitTests), "Unit Tests"); this.Query = new SafeCallServiceQuery <string>(() => Task.FromResult("Success"), this.Metadata); }
public void Constuct_Successfully() { this.Metadata = new SafeCallServiceLogMetadata(Guid.NewGuid(), typeof(SafeCallServiceLogMetadataUnitTests), "Unit Tests"); }