public AddPsalmResponse Add(AddPsalmRequest request)
        {
            var response = new AddPsalmResponse();

            try
            {
                psalmList.Add(request.Psalm);
            }
            catch (Exception ex)
            {
                response.Exception = ex;
            }

            return(response);
        }
Beispiel #2
0
        public AddPsalmResponse Add(AddPsalmRequest request)
        {
            var resp = new AddPsalmResponse();

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