예제 #1
0
 public ActionResult <List <Roulette> > getRoulettes()
 {
     try
     {
         DataRoulette    dataRoulett = new DataRoulette();
         List <Roulette> returnList  = (List <Roulette>)dataRoulett.getRoulette();
         return(returnList);
     }
     catch (Exception e)
     {
         return((List <Roulette>)null);
     }
 }
예제 #2
0
 public ActionResult CreateRoulette()
 {
     try
     {
         DataRoulette data     = new DataRoulette();
         int          a        = data.getRoulette().Count() + 1;
         DTO.Roulette roulette = new DTO.Roulette {
             Id = a
         };
         data.Create(roulette);
         return(Ok(roulette.Id));
     }
     catch (Exception e)
     {
         return(StatusCode(500, e.Message));
     }
 }