public string AddNewSubType(string catName) { string id; if (_subTypeRepository.GetAll().Any(t => t.SubTypeName == catName)) { return("titletaken"); } SubType subtypes = new SubType(); subtypes.SubTypeName = catName; _subTypeRepository.Insert(subtypes); id = subtypes.SubTypeID.ToString(); return(id); }