public async Task <RepositoryResponse <List <InfoCategoryViewModel> > > UpdateInfos([FromBody] List <InfoCategoryViewModel> models)
 {
     if (models != null)
     {
         return(await InfoCategoryViewModel.UpdateInfosAsync(models));
     }
     else
     {
         return(new RepositoryResponse <List <InfoCategoryViewModel> >());
     }
 }
Exemplo n.º 2
0
        public override void ExpandView(SiocCmsContext _context = null, IDbContextTransaction _transaction = null)
        {
            var getCategory = InfoCategoryViewModel.Repository.GetModelListBy(p => p.Id == Id && p.Specificulture == Specificulture
                                                                              , _context: _context, _transaction: _transaction
                                                                              );

            if (getCategory.IsSucceed && getCategory.Data.Count > 0)
            {
                Category = getCategory.Data[0];
            }
            var getParent = InfoCategoryViewModel.Repository.GetModelListBy(p => p.Id == ParentId && p.Specificulture == Specificulture
                                                                            , _context: _context, _transaction: _transaction
                                                                            );

            if (getParent.IsSucceed && getCategory.Data.Count > 0)
            {
                Parent = getCategory.Data[0];
            }
        }