public async Task <ActionResult <LaundryList> > Post(LaundryList list) { LaundryDatabaseConnection x = new LaundryDatabaseConnection(); x.laundryDatabaseUpload(list.MachineNumber, list.TimeSet, list.Available); return(CreatedAtAction(nameof(list), new {}, list)); }
public IEnumerable <LaundryList> Get() { var rng = new Random(); LaundryDatabaseConnection x = new LaundryDatabaseConnection(); ArrayList data = x.laundryDatabaseDownload(); return(Enumerable.Range(1, 15).Select(index => new LaundryList { MachineNumber = index, Date = (data[index - 1] as LaundryList).Date, TimeSet = (data[index - 1] as LaundryList).TimeSet, Available = (data[index - 1] as LaundryList).Available }).ToArray()); }