Пример #1
0
        public async Task <IActionResult> GetByIdAsync(Guid id)
        {
            var task = await crud.GetByIdAsync <TaskItem>(id);

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

            return(Ok(task));
        }
Пример #2
0
        public async Task <IActionResult> GetByIdAsync(Guid id)
        {
            var account = await crudProvider.GetByIdAsync <Account>(id);

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

            return(Ok(new
            {
                account.Id,
                account.Name,
                account.DisplayName,
                account.Email
            }));
        }