public Result<PhraseDto> Update(PhraseDto dtoToUpdate) { Result<PhraseDto> retResult = Result<PhraseDto>.Undefined(null); try { Common.CommonHelper.CheckAuthentication(); var updatedDto = UpdateImpl(dtoToUpdate); retResult = Result<PhraseDto>.Success(updatedDto); } catch (Exception ex) { var wrappedEx = new Exceptions.UpdateFailedException(ex); retResult = Result<PhraseDto>.FailureWithInfo(null, wrappedEx); } return retResult; }
public Result <PhraseDto> Update(PhraseDto dtoToUpdate) { Result <PhraseDto> retResult = Result <PhraseDto> .Undefined(null); try { Common.CommonHelper.CheckAuthentication(); var updatedDto = UpdateImpl(dtoToUpdate); retResult = Result <PhraseDto> .Success(updatedDto); } catch (Exception ex) { var wrappedEx = new Exceptions.UpdateFailedException(ex); retResult = Result <PhraseDto> .FailureWithInfo(null, wrappedEx); } return(retResult); }
public Result <PhraseDto> Insert(PhraseDto dtoToInsert) { Result <PhraseDto> retResult = Result <PhraseDto> .Undefined(null); try { Common.CommonHelper.CheckAuthentication(); var insertedDto = InsertImpl(dtoToInsert); retResult = Result <PhraseDto> .Success(insertedDto); } catch (Exception ex) { var wrappedEx = new Exceptions.InsertFailedException(ex); retResult = Result <PhraseDto> .FailureWithInfo(null, wrappedEx); } return(retResult); }
public Result<PhraseDto> Insert(PhraseDto dtoToInsert) { Result<PhraseDto> retResult = Result<PhraseDto>.Undefined(null); try { Common.CommonHelper.CheckAuthentication(); var insertedDto = InsertImpl(dtoToInsert); retResult = Result<PhraseDto>.Success(insertedDto); } catch (Exception ex) { var wrappedEx = new Exceptions.InsertFailedException(ex); retResult = Result<PhraseDto>.FailureWithInfo(null, wrappedEx); } return retResult; }
protected abstract PhraseDto UpdateImpl(PhraseDto dto);
protected abstract PhraseDto InsertImpl(PhraseDto dto);