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); } }
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)); } }