Exemple #1
0
        public ErrorResult Delete(int id)
        {
            if (!Models.Platform.IsValidId(id))
            {
                return(new ErrorResult(ErrorCode.InvalidPlatformId, $"The Id of the Platform you are attempting to retrieve is invalid. The Id that was provided was:'{id}'"));
            }

            ErrorResult errorResult = _repo.Delete(id);

            if (errorResult != ErrorResult.None)
            {
                return(errorResult);
            }

            return(ErrorResult.None);
        }