예제 #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));
        }