private static ResultWrapper <RestrictionReadDto> CreateResultWrapper(RestrictionReadDto readDto, string fieldName) { ResultWrapper <RestrictionReadDto> resultWrapper = new ResultWrapper <RestrictionReadDto>(); if (readDto == null) { resultWrapper.AddError(ErrorFactory.CreateError(ErrorType.Id, fieldName)); } resultWrapper.SetResult(readDto); return(resultWrapper); }
private static ResultWrapper <ProductReadDto> CreateResultWrapper(ProductReadDto finishReadDto) { ResultWrapper <ProductReadDto> resultWrapper = new ResultWrapper <ProductReadDto>(); if (finishReadDto == null) { resultWrapper.AddError(ErrorFactory.CreateError(ErrorType.Id, nameof(Product.Id))); } resultWrapper.SetResult(finishReadDto); return(resultWrapper); }