Exemple #1
0
        public Result <LanguageDto> Update(LanguageDto dtoToUpdate)
        {
            Result <LanguageDto> retResult = Result <LanguageDto> .Undefined(null);

            try
            {
                Common.CommonHelper.CheckAuthentication();

                var updatedDto = UpdateImpl(dtoToUpdate);
                retResult = Result <LanguageDto> .Success(updatedDto);
            }
            catch (Exception ex)
            {
                var wrappedEx = new Exceptions.UpdateFailedException(ex);
                retResult = Result <LanguageDto> .FailureWithInfo(null, wrappedEx);
            }
            return(retResult);
        }
Exemple #2
0
        public Result <LanguageDto> Insert(LanguageDto dtoToInsert)
        {
            Result <LanguageDto> retResult = Result <LanguageDto> .Undefined(null);

            try
            {
                Common.CommonHelper.CheckAuthentication();

                var insertedDto = InsertImpl(dtoToInsert);
                retResult = Result <LanguageDto> .Success(insertedDto);
            }
            catch (Exception ex)
            {
                var wrappedEx = new Exceptions.InsertFailedException(ex);
                retResult = Result <LanguageDto> .FailureWithInfo(null, wrappedEx);
            }
            return(retResult);
        }
Exemple #3
0
 protected abstract LanguageDto InsertImpl(LanguageDto dto);
Exemple #4
0
 protected abstract LanguageDto UpdateImpl(LanguageDto dto);