Beispiel #1
0
        public bool Save(SubCategory subCategory)
        {
            int rowAffected = _subCategoryRepository.Save(subCategory);

            bool isSaved = rowAffected > 0;

            return(isSaved);
        }
        public bool Save(SubCategory obj)
        {
            // save code ...

            int  rowAffected = _Repository.Save(obj);
            bool isSaved     = rowAffected > 0;

            return(isSaved);
        }
        public ActionResult Edit(SubCategory model, Guid id)
        {
            SubCategory secilenKat = altKategoriRepo.Find(id);

            secilenKat.Name           = model.Name;
            secilenKat.Description    = model.Description;
            secilenKat.MainCategoryID = model.MainCategoryID;
            altKategoriRepo.Save();

            return(RedirectToAction("Index", "SubCategory", new { area = "Admin" }));
        }