//To View all Categorys details public IList <CategoryModel> GetAllCategorys() { IList <CategoryModel> list = new List <CategoryModel>(); try { list = ICategoryrepo.GetAllCategorys(); } catch (Exception ex) { Console.WriteLine(ex); } return(list); }