Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add good getting started for single program template .NET 6 project #175

Open
soroshsabz opened this issue Aug 4, 2023 · 6 comments

Comments

@soroshsabz
Copy link

soroshsabz commented Aug 4, 2023

ITNOA

Please add good example that fit to .NET 6 Web API new template project

as you can see https://stackoverflow.com/questions/69754985/adding-autofac-to-net-core-6-0-using-the-new-single-file-template some people have same problem

@tillig
Copy link
Member

tillig commented Aug 4, 2023

I don't know what ITNOA means but you seem to be putting that in all of your issues like that's something common we should know about.

It's not that hard to adapt, but it does seem reasonable to add this to the docs. We'd be happy to see a PR for it, or you can wait for one of us to get around to it.

@soroshsabz
Copy link
Author

@tillig This is to start a polite text in our culture.

@AntMaster7
Copy link

@tillig I can do a PR. However, I think the "Configuration Method Naming Conventions" section should turn into a sub section of the startup chapter. Something like

  • Quick Start
    • ASP.NET Core 1.1 - 2.2
    • ASP.NET Core 3.0+ and Generic Hosting
      • Startup Class
        • Configuration Method Naming Conventions
    • ASP.NET Core 6.0+
  • ...

@tillig
Copy link
Member

tillig commented Oct 23, 2023

I haven't put a lot of thought into this, but things in thinking about:

  • We have a whole examples repo. I'm not sure how much needs to be duplicated in docs vs. linked.
  • The naming conventions for things and the notion of the startup class don't just stop in ASP.NET 6. However, people tend to see sub-sections like that and stop reading. "I'm in .NET 6 so that doesn't apply to me! What are the new conventions? I don't see them."
  • Maybe the breakdown is different - Pre-Generic Hosting, Generic Hosting, and Minimal APIs. (I think the new thing is called minimal APIs...?)
  • There's also "generic hosting without a Startup class."

You can see why we haven't really gotten here. There are a ton of combinations of hosting and app type available, all of which are already pretty well covered by ASP.NET docs, but which we will largely have to duplicate in order to serve the purpose of making it Autofac-specific.

Again, this is me banging out thoughts on my phone between trying to get a couple other things done. It's not guidance, it's not me saying, "Here's the task," it's just thoughts off the top of my head.

@AntMaster7
Copy link

AntMaster7 commented Oct 24, 2023

@tillig How about putting a link to the autofac sample at https://learn.microsoft.com/en-us/aspnet/core/migration/50-to-60-samples?view=aspnetcore-7.0#aspnet-core-6-7 into the documentation for the new "minimal hosting model in ASP.NET Core 6.0". This will probably not do any harm and could come in really handy to some. Although there is a risk of Microsoft changing links arbitrarily.

@tillig
Copy link
Member

tillig commented Oct 24, 2023

I'd be fine with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants