Ejemplo n.º 1
0
        public IHttpActionResult Get()
        {
            BodyService bodyService = CreateBodyService();
            var         bodies      = bodyService.GetBodies();

            return(Ok(bodies));
        }
Ejemplo n.º 2
0
        public IHttpActionResult Get(int id)
        {
            BodyService bodyService = CreateBodyService();
            var         body        = bodyService.GetBodyById(id);

            return(Ok(body));
        }
Ejemplo n.º 3
0
        private BodyService CreateBodyService()
        {
            var userId      = Guid.Parse(User.Identity.GetUserId());
            var bodyService = new BodyService(userId);

            return(bodyService);
        }