public void Active(int id) { var category = _ArcRep.GetArticleCategoryBy(id); category.Activate(); _ArcRep.Save(); }
public OperationResult Create(CreateArticleCategory command) { OperationResult operationResult = new OperationResult(); if (_articleCategoryRepo.Exists(c => c.Name == command.Name)) { return(operationResult.Failed(ApplicationMessage.duplicated)); } var slug = command.Slug.Slugify(); var Acategory = new ArticleCategory(command.Name, command.Description, slug, command.ShowOrder, command.KeyWords, command.MetaDescription, command.CanonicalAddress); _articleCategoryRepo.Create(Acategory); _articleCategoryRepo.Save(); return(operationResult.Succeeded()); }