Esempio n. 1
0
        public OperationReturnModel <List <ListModel> > CopyList(ListCopyShareModel copyListModel)
        {
            OperationReturnModel <List <ListModel> > ret = new OperationReturnModel <List <ListModel> >();

            try
            {
                var list = _listService.CopyList(this.AuthenticatedUser, this.SelectedUserContext, copyListModel);

                foreach (ListModel l in list)
                {
                    _cacheListLogic.RemoveSpecificCachedList(l);
                }

                _cacheListLogic.ClearCustomersListCaches(this.AuthenticatedUser, this.SelectedUserContext, _listService.ReadUserList(this.AuthenticatedUser, this.SelectedUserContext, true));

                ret.SuccessResponse = list;
                ret.IsSuccess       = true;
            }
            catch (Exception ex)
            {
                ret.IsSuccess    = false;
                ret.ErrorMessage = ex.Message;
                _elRepo.WriteErrorLog("CopyList", ex);
            }
            return(ret);
        }