Exemplo n.º 1
0
        // GET: Branches/Details/5
        public ActionResult Details(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            var branch = _db.FindById(id);

            if (branch == null)
            {
                return(HttpNotFound());
            }
            return(View(branch));
        }
Exemplo n.º 2
0
        public void IsRepositoryAddsBranch()
        {
            Branch branchToInsert = new Branch {
                Id = 1, BranchName = "Anushka Sales", BranchAddress = "Kamptee Road, Indora Square", BranchCity = "Nagpur", BranchPinCode = 440014
            };

            repo.Add(branchToInsert);
            var result = repo.FindById(1);

            Assert.IsNotNull(result);
        }