예제 #1
0
        public async Task <IActionResult> Details(int?id, string status = null)
        {
            if (id == null)
            {
                return(NotFound());
            }

            ViewBag.status = status;
            var meeting = await _meetingService.Get(id.Value, status);

            if (meeting == null)
            {
                return(NotFound());
            }

            return(View(meeting));
        }
예제 #2
0
        public async Task <IActionResult> Get(Guid id)
        {
            var result = await _service.Get(id);

            if (result == null)
            {
                _log.LogWarning($"Cannot find BusinessModel by id={id}");
                return(NotFound($"Cannot find BusinessModel by id={id}"));
            }
            return(Ok(result));
        }
예제 #3
0
        public async Task <ManagementCompanyProfileView> Handler(string managementCompanyName, CancellationToken cancellationToken)
        {
            var managementCompany = await repository.Get(managementCompanyName, cancellationToken);

            var meetingId = await meetingService.Get(managementCompany.ManagementCompanyId, cancellationToken);

            return(new ManagementCompanyProfileView()
            {
                Id = managementCompany.ManagementCompanyId,
                Name = managementCompany.Name,
                Info = managementCompany.Info,
                HasMeeting = meetingId == null ? null : meetingId.MeetingId.ToString(),
                Avatar = managementCompany.Avatar
            });
        }