public async Task <ActionResult> DeleteConfirmed(byte id)
        {
            BikeCode bikeCode = await db.BikeCodes.FindAsync(id);

            db.BikeCodes.Remove(bikeCode);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
        public async Task <ActionResult> Edit([Bind(Include = "id,label,description")] BikeCode bikeCode)
        {
            if (ModelState.IsValid)
            {
                db.Entry(bikeCode).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(bikeCode));
        }
        public async Task <ActionResult> Create([Bind(Include = "id,label,description")] BikeCode bikeCode)
        {
            if (ModelState.IsValid)
            {
                db.BikeCodes.Add(bikeCode);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(bikeCode));
        }
        // GET: BikeCodes/Delete/5
        public async Task <ActionResult> Delete(byte?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            BikeCode bikeCode = await db.BikeCodes.FindAsync(id);

            if (bikeCode == null)
            {
                return(HttpNotFound());
            }
            return(View(bikeCode));
        }