// GET: SingerModels
        public ActionResult Index()
        {
            ICollection <SingerModel> singerModel = new List <SingerModel>();
            SingerBinder singerBinder             = new SingerBinder();

            singerModel = singerBinder.Bind(db.Singer.ToList());
            return(View(singerModel));
        }
 public ActionResult Edit([Bind(Include = "Id,Name")] SingerModel singerModel)
 {
     if (ModelState.IsValid)
     {
         SingerBinder singerBinder = new SingerBinder();
         Singer       singer       = new Singer();
         singer = singerBinder.Bind(singerModel);
         db.Entry(singer).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(singerModel));
 }
        public ActionResult Create([Bind(Include = "Id,Name")] SingerModel singerModel)
        {
            if (ModelState.IsValid)
            {
                SingerBinder singerBinder = new SingerBinder();
                Singer       singer       = singerBinder.Bind(singerModel);
                db.Singer.Add(singer);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(singerModel));
        }