/// <summary>
        /// Gets test results by id
        /// </summary>
        /// <param name="id">Test result id</param>
        /// <returns>Test result</returns>
        public BllTestResult GetById(int id)
        {
            var testResult = testResultRepository.GetById(id);

            if (testResult == null)
            {
                return(null);
            }
            return(testResult.ToBllTestResult());
        }
Пример #2
0
        public async Task <TestResultViewModel> GetAsync(Guid id)
        {
            var testResult = await _testResultRepository.GetById(id);

            return(testResult is null ? null : Mapper.Map(testResult));
        }