GithubHelp home page GithubHelp logo

Comments (8)

sleeuwen avatar sleeuwen commented on June 23, 2024 1

Hi @thepigeonfighter
I've been working on the support for razor pages in the branch feature/razor-pages. As part of that work I also released a preview version of the library at v0.4.0-alpha.1 to nuget. I just wanted to test it out on some larger projects than the small sample project I created in the repo before releasing the full version. But if you're interested you can already try out the alpha version as it should already work.

For the blazor components, I don't know too much about it yet but it definitely sounds interesting. If you have any ideas on that I'd love to know but might be better to track that in a different issue. If you want to take a stab at it yourself that's also cool (but it's probably better to wait before 0.4.0 is released as from what you said you can probably reuse some of the code for that).

from urlactiongenerator.

sleeuwen avatar sleeuwen commented on June 23, 2024 1

@TorreyGarland I've just published version 0.4.0 to NuGet which adds support for Razor Pages (via @Url.Pages()). There might still be some rough edges with it but @thepigeonfighter did a great job testing the alpha versions already. Please try it out and let me know if you have any issues with it.

I think this should cover most of this issue, as far as I can tell Web API should also work fine as long as you have a IUrlHelper.

from urlactiongenerator.

TorreyGarland avatar TorreyGarland commented on June 23, 2024 1

Just tested. Works like a champ. Thanks for the upgrade.

from urlactiongenerator.

sleeuwen avatar sleeuwen commented on June 23, 2024

Hi @TorreyGarland,

I'm interested in your suggestion as I've also thought about how I could integrate it with razor pages. So I'm curious how you would see such an integration work?

For web APIs, in asp.net core APIs use the same controller discovery as for mvc so I think that should already work. If it doesn't work for you I'd like to know what you're trying to do as that would be a bug (note: .net framework asp.net web APIs are not supported and I don't plan to add support for it)

Lastly, I'm not sure what you're asking for with the signalr hubs, can you elaborate on this?

from urlactiongenerator.

TorreyGarland avatar TorreyGarland commented on June 23, 2024

I am or have worked on several MVC projects, both .NET Framework and Core.

One of my biggest pet peeves is hard-coded URLs that are either misspelled or not changed automatically upon refactoring. I have magic strings in general.

We were using T4MVC (works great) and R4MVC, but R4MVC is lacking in a few needed features, in particular PageModel url generation.

Working on a .NET 5 MVC project right now. I would really like to see something similar to what you have, but also provides support for PageModels and WebApis. Maybe SignalR is a bit of a stretch.

As far as the path that I would suggest...check to see if a INamedTypeSymbol basetype ends with "PageModel".

from urlactiongenerator.

thepigeonfighter avatar thepigeonfighter commented on June 23, 2024

Hello, I just started a personal project to do exactly what this set out to do. I too would like to add support for Page Models and Blazor components. I was just reading up on this last night. It sounds like the @page in both PageModels and Blazor components should be the thing to filter on as they essentially create a RouteAttribute on the page model classes. Are you looking for contributions to this code base or would you prefer to keep this a solo project?

from urlactiongenerator.

thepigeonfighter avatar thepigeonfighter commented on June 23, 2024

Ah I see that this feature is under development. Look forward to checking it out.

from urlactiongenerator.

thepigeonfighter avatar thepigeonfighter commented on June 23, 2024

Ok great, I've been looking through the code looks pretty good, the API is a little different than the way I had imagined but seems promising. I'll try out the alpha and if I have any issues I'll let you know. Thanks for all the hard work.

from urlactiongenerator.

Related Issues (7)

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.