public async Task <TestCaseResponse> InsertAsync(TestCaseRequest testCaseRequest) { var testCase = testCaseRequest.ToDataModel(); await _dbService.InsertAsync(testCase); return(testCase.ToResponse()); }
public async Task <TestRunResponse> InsertTestRunAsync(int sessionId, TestRunRequest testRunRequest) { var testRun = testRunRequest.ToDataModel(sessionId); await _dbService.InsertAsync(testRun); return(testRun.ToResponse()); }
public async Task InsertMessageAsync(ChatMessageDTO messageDto) { var userId = await _usersService.GetUserIdAsync(messageDto.UserName); string guestUserName = null; if (userId == null) { guestUserName = messageDto.UserName; } var message = messageDto.ToDataModel(userId, guestUserName); await _dbService.InsertAsync(message); }