Git Product home page Git Product logo

Comments (6)

chullybun avatar chullybun commented on June 6, 2024 1

Thanks @edjo23 - I have merged in the PR and published an updated NuGet package for Beef.CodeGen.Core v3.1.7.

from beef.

chullybun avatar chullybun commented on June 6, 2024

Hi. This is a combination of things primarily related to the Nullable Reference Type support that was recently added. The issue is because the Type was not defined as nullable, therefore it is assumed it should not be null - and because it was null, the NullReferenceException was thrown.

I have made a fix within the code generation to support a nullable ReturnType where using OperationType="Custom" if a null result is considered valid; e.g. ReturnType="Tenant?"

You will need to amend your XML to add the nullable ? to the ReturnType and re-run the code generation using the latest NuGet packages (just published).

from beef.

edjo23 avatar edjo23 commented on June 6, 2024

Thanks @chullybun, can confirm that when we add a ? to the return type it is now working as expected. We did find though if we didn't add the ? the cache line is not include in the gen code at all. I made a comment on the commit as to why I think that is happening.

from beef.

edjo23 avatar edjo23 commented on June 6, 2024

Link to comment - 9d0e436#r39025982 ... but basically there is a ' character which I think is causing the issue.

from beef.

edjo23 avatar edjo23 commented on June 6, 2024

I've created PR #38 for the fix.

from beef.

edjo23 avatar edjo23 commented on June 6, 2024

Thanks

from beef.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.