コード例 #1
0
        public async Task <IHttpActionResult> Get(int?id = null)
        {
            if (id == null)
            {
                var tasks = await _taskItemService.GetAllAsync();

                return(Ok(content: tasks));
            }
            var task = await _taskItemService.GetByIdAsync(id : id.Value);

            return(Ok(content: task));
        }