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