Exemplo n.º 1
0
        public CategoryItemModel(NewsCategory category)
        {
            Id = category.Id;
            Name = category.Name;
            Description = category.Description;
            ParentId = category.ParentId;
            ParentName = category.ParentId.HasValue ? category.NewsCategory1.Name : string.Empty;
            Total = category.NewsNewsCategories.Count;

            DetailsUrl = UrlUtilities.GenerateUrl(HttpContext.Current.Request.RequestContext, "NewsCategory", "Details",
                                                  new
                                                      {
                                                          id = category.Id,
                                                          title = category.Name.ToUrlString()
                                                      });
        }
Exemplo n.º 2
0
 public ResponseModel Delete(NewsCategory newsCategory)
 {
     return _newsCategoryRepository.Delete(newsCategory);
 }
Exemplo n.º 3
0
 public ResponseModel Update(NewsCategory newsCategory)
 {
     return _newsCategoryRepository.Update(newsCategory);
 }
Exemplo n.º 4
0
 public ResponseModel Insert(NewsCategory newsCategory)
 {
     return _newsCategoryRepository.Insert(newsCategory);
 }
Exemplo n.º 5
0
 public ResponseModel HierarchyUpdate(NewsCategory newsCategory)
 {
     return _newsCategoryRepository.HierarchyUpdate(newsCategory);
 }