dotnet / EntityFramework.Docs

Documentation for Entity Framework Core and Entity Framework 6
https://docs.microsoft.com/ef/
Creative Commons Attribution 4.0 International
1.63k stars 1.96k forks source link

Can this sample has an option for SQL Server instead of just SQLite? #3350

Open chanmmn opened 3 years ago

chanmmn commented 3 years ago

We all know that most of the real application out there is going to use SQL Server or even SQL Server Express than SQLite. Should the sample has an option for SQL Server or just SQL Server instead of SQLite?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

roji commented 3 years ago

As a getting started code sample, Sqlite has the advantage of working out of the box, on any platform, without having to install anything. SQL Server would require installation (e.g. Linux, macOS).

AndriySvyryd commented 3 years ago

EF Triage: Add a tab for SQL Server

Rick-Anderson commented 3 years ago

As a getting started code sample, Sqlite has the advantage of working out of the box, on any platform, without having to install anything. SQL Server would require installation (e.g. Linux, macOS).

90%+ of our customers are on windows, and SQL Express is the most convenient for them.

EF Triage: Add a tab for SQL Server

3 tabs would be very clumsy. VS should use SQL Server rather than SQLite.

roji commented 3 years ago

90%+ of our customers are on windows, and SQL Express is the most convenient for them.

A default getting started sample which fails - by definition - on non-Windows platforms wouldn't be very cross-platform of us..

3 tabs would be very clumsy. VS should use SQL Server rather than SQLite.

The proposal here was to add SQL Server alongside Sqlite, so only 2. More importantly, why would a tab be clumsy? We use them a lot in our docs (e.g. fluent API vs. data annotations) and they seem to work quite well.

Rick-Anderson commented 3 years ago

A default getting started sample which fails - by definition - on non-Windows platforms wouldn't be very cross-platform of us..

Why would it fail if they select the correct tab?

Add a tab for SQL Server

You're not adding a tab. Adding a 3rd tab for SQL Server would be clumsy. Change the VS tab to use SQL Express. Just a communications break down. Rather than adding a tab, VS will use SQL Express. VS is not xplat.

Check out my EF intro. It's got 3 tabs, but not a dedicated SQL Server tab.

roji commented 3 years ago

I think we've been talking about separate things here (my fault). We have the following:

Rick-Anderson commented 3 years ago

We get over $200K PV/month on our intro tutorials EF tutorials and we've found customers like our 3 tabs - 80% being VS, 17% VSC and most of the VSC folks are on window. MacOS is low. We've never had a complaint about no CLI tab as that's covered under VSC and most folks prefer VSC. We make money on VS but not on VSC. When we had a CLI tab we did get a lot of complaints they wanted VSC instructions.

  • There's our very first Welcome page, which has no tabs (no mention of VS/dotnet CLI yet at this stage), and uses SqlServer. We may want to have Sqlite/SqlServer tabs here (with Sqlite the default), though maybe that's adding a tiny bit to the very first page.

There should be no default other than the first tab is what 80% of customers use, VS. VS should use SQL Express. Based on traffic and customer reports, VS tab with SQL Express and CLI tab.

  • I can't really see any SQL Server/Sqlite decision point in the ASP.NET EF intro -

Which tab is the only decision

  • Note that in the SQL Logging section there's a SQL Server LocalDB connection string without any tab, so someone going through this on Mac/Linux would be seeing the wrong thing.

The point of that is the highlighted logging setting and has caused no confusion. Once https://github.com/dotnet/aspnetcore/issues/32977 is resolved, that section goes away.

  • I think it would be a bit odd/confusing for our VS and dotnet CLI tabs to implicitly show different databases, though I guess I'm not totally against it.

Why do you say that? End users never see the difference. VSC/MacOS folks select a tab once at the start and they never see a difference. We've been doing this since .NET Core 1.0 on high traffic tutorials.

roji commented 3 years ago

We've never had a complaint about no CLI tab as that's covered under VSC and most folks prefer VSC.

We've also hardly ever had a complaint about the sample being Sqlite and not SQL Server.

We make money on VS but not on VSC.

I personally don't believe this should be the sole source of reasoning on how we build products or write docs. At some point Microsoft never made money from Linux either, and the way it built its products back then ensured it would stay that way.

When we had a CLI tab we did get a lot of complaints they wanted VSC instructions.

I never said you shouldn't have a VSC tab, only to consider adding a command-line tab. This is the kind of thing that would keep me away - as a Linux user - with the impression that Microsoft doesn't care or invest in the command-line experience.

I think it would be a bit odd/confusing for our VS and dotnet CLI tabs to implicitly show different databases, though I guess I'm not totally against it.

Why do you say that? End users never see the difference. VSC/MacOS folks select a tab once at the start and they never see a difference. We've been doing this since .NET Core 1.0 on high traffic tutorials.

Because it conflates IDE choice with database choice; these two things are orthogonal, even though there's obviously a correlation.

You obviously have strong opinions here, thanks for the feedback. I guess we'll discuss this more in-depth and make a decision as a team.

Rick-Anderson commented 3 years ago

I personally don't believe this should be the sole source of reasoning on how we build products or write docs.

No one would say that. I'm just echoing what Hunter stated multiple times.

I think it would be a bit odd/confusing for our VS and dotnet CLI tabs to implicitly show different databases, though I guess I'm not totally against it.

Why do you say that? End users never see the difference. VSC/MacOS folks select a tab once at the start and they never see a difference. We've been doing this since .NET Core 1.0 on high traffic tutorials.

Because it conflates IDE choice with database choice; the

It's caused no detectable confusion in many millions of views.

This is the kind of thing that would keep me away - as a Linux user

All the command line commands are on the VSC tab. It turns out most folks on Linux prefer VSC, those that don't run the same commands in on a command line rather that the VSC command line.