Documentation icon indicating copy to clipboard operation
Documentation copied to clipboard

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

Open soroshsabz opened this issue 2 years ago • 6 comments

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

soroshsabz avatar Aug 04 '23 13:08 soroshsabz

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.

tillig avatar Aug 04 '23 14:08 tillig

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

soroshsabz avatar Aug 04 '23 15:08 soroshsabz

@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+
  • ...

AntMaster7 avatar Oct 22 '23 21:10 AntMaster7

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.

tillig avatar Oct 23 '23 01:10 tillig

@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.

AntMaster7 avatar Oct 24 '23 17:10 AntMaster7

I'd be fine with that.

tillig avatar Oct 24 '23 17:10 tillig