Example #1
0
 public Object Post(PuntajeDTO puntaje)
 {
     try
     {
         BusinessLogic.Controllers.PuntajeController puntajeController = new BusinessLogic.Controllers.PuntajeController();
         puntajeController.Create(puntaje);
         return(new ResponseDTO(HttpStatusCode.Created, "Se ha creado el puntaje correctamente.", true));
     }
     catch (Exception e)
     {
         return(Content(HttpStatusCode.InternalServerError, new ResponseDTO(null, e.Message, false)));
     }
 }
Example #2
0
 public HashSet <PuntajeDTO> Get(int juegoId)
 {
     try
     {
         BusinessLogic.Controllers.PuntajeController puntajeController = new BusinessLogic.Controllers.PuntajeController();
         var lista = puntajeController.GetAll(juegoId);
         return(lista);
     }
     catch (Exception e)
     {
         throw e;
     }
 }