public ActionResult Edit(Bill model)
 {
     if (ModelState.IsValid)
     {
         _service.Update(model);
     }
     return RedirectToAction("Index");
 }
 public ActionResult Create(Bill model)
 {
     if (ModelState.IsValid)
     {
         _service.Add(model);
     }
     return RedirectToAction("Index");
 }
        public void AddBill_Succcess()
        {
            var repo = new Mock<IGenericRepository>();

            var newBill = new Bill()
            {
                Name = "Lee"
            };

            repo.Setup(x => x.Create<Bill>(It.IsAny<Bill>())).Verifiable();

            var service = new BillService(repo.Object);

            service.Add(newBill);

            repo.Verify();
        }