public async Task <ActionResult> DeleteConfirmed(int id)
        {
            RatingTableViewModel ratingTableViewModel = await db.RatingTableViewModels.FindAsync(id);

            db.RatingTableViewModels.Remove(ratingTableViewModel);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
        public async Task <ActionResult> Edit([Bind(Include = "Id,Date,Data")] RatingTableViewModel ratingTableViewModel)
        {
            if (ModelState.IsValid)
            {
                db.Entry(ratingTableViewModel).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(ratingTableViewModel));
        }
        public async Task <ActionResult> Create([Bind(Include = "Id,Date,Data")] RatingTableViewModel ratingTableViewModel)
        {
            if (ModelState.IsValid)
            {
                db.RatingTableViewModels.Add(ratingTableViewModel);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(ratingTableViewModel));
        }
        // GET: RatingTable/Edit/5
        public async Task <ActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            RatingTableViewModel ratingTableViewModel = await db.RatingTableViewModels.FindAsync(id);

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