Esempio n. 1
0
        public IEnumerable <ErrorPoco> UpdateStatusForMatchingItems(int id, string status)
        {
            ErrorItemStatus oStatus;

            if (Enum.TryParse(status, true, out oStatus))
            {
                return(_repo.UpdateStatusForMatchingItems(id, oStatus).Select(GetErrorItemPoco));
            }
            //if we're here, the status didn't match
            throw new Exception("Status \"" + status + "\" is not an acceptable status value for an ErrorItem updaterr.");
        }