コード例 #1
0
        public UpdatePsalmResponse Update(UpdatePsalmRequest request)
        {
            var response = new UpdatePsalmResponse();

            try
            {
                var psalm = psalmList.First(c => c.Number == request.Psalm.Number);
                //psalm.Number = request.Psalm.Number;
                psalm.Definition = request.Psalm.Definition;
            }
            catch (Exception ex)
            {
                response.Exception = ex;
            }

            return(response);
        }
コード例 #2
0
        public UpdatePsalmResponse Update(UpdatePsalmRequest request)
        {
            var resp = new UpdatePsalmResponse();

            try
            {
                if (request.Psalm == null)
                {
                    resp.Exception = new ArgumentNullException("UpdatePsalmRequest.Psalm");
                }
                else
                {
                    _unitOfWork.Repository <Psalm>().Update(request.Psalm);
                    //_unitOfWork.Commit();
                }
            }
            catch (Exception ex)
            {
                resp.Exception = ex;
            }
            return(resp);
        }