コード例 #1
0
        public IHttpActionResult GetMovement(int id)
        {
            Movement movement = db.Movements.Include(m => m.Wods)
                                            .Where(x => x.Id == id).AsNoTracking()
                                            .FirstOrDefault();
            if (movement == null)
            {
                return NotFound();
            }

            MovementDTO dto = new MovementDTO(movement);
            return Ok(dto);
        }
コード例 #2
0
        public IHttpActionResult GetMovement(int id)
        {
            Movement movement = db.Movements.Include(m => m.Wods)
                                .Where(x => x.Id == id).AsNoTracking()
                                .FirstOrDefault();

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

            MovementDTO dto = new MovementDTO(movement);

            return(Ok(dto));
        }