public RedirectToRouteResult AddNewCategory(Category cat) { using (SSISdbEntities e = new SSISdbEntities()) { string categoryCount = (e.Categories.Count() + 1).ToString(); cat.CategoryID = "C" + categoryCount; cat.Active = 1; DAL.CategoryRepositoryImpl dal = new DAL.CategoryRepositoryImpl(e); dal.InsertCategory(cat); e.SaveChanges(); return(RedirectToAction("Maintenance", "Store")); } }