Beispiel #1
0
        public ActionResult Delete(int id)
        {
            List <string> errors = _profileAppService.Delete(id);

            if (errors?.Count > 0)
            {
                if (errors.Contains(CodLogErrorEnum.CODELOGERROR.ToString()))
                {
                    this.Flash("Error", ResultMessages.AplicationException());
                }
                else
                {
                    var errorListGroupped = errors.Aggregate((i, j) => i + "<br/>" + j);
                    this.Flash("Error", errorListGroupped);
                }
            }
            else
            {
                this.Flash("Success", ResultMessages.Success());
            }

            return(RedirectToAction("Index"));
        }