public override async Task <AddSyncResponse> AddSync(AddSyncRequest request, ServerCallContext context) { using var unitOfWork = _unitOfWorkFactory.Create(); var syncWatch = new SyncWatch { SourcePath = request.SourcePath, TargetPath = request.TargetPath }; await _syncService.AddWatchAsync(unitOfWork, syncWatch); await unitOfWork.CommitAsync(); return(new AddSyncResponse { Result = ErrorCode.Ok, ErrorMessage = string.Empty, Sync = new Sync { SourcePath = syncWatch.SourcePath, TargetPath = syncWatch.TargetPath } }); }