dotnet / efcore

EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.
https://docs.microsoft.com/ef/
MIT License
13.78k stars 3.19k forks source link

Clean up TFMs and #ifs #3517

Closed divega closed 9 years ago

divega commented 9 years ago

We need to follow up on a few issues after 7e0ba479a2cc1242ff7d6688687a740bd8a606f4:

natemcmaster commented 9 years ago

Our code falls down in 2 places due to generations and our uses of #if:

  1. Throwing for ambient transactions If using net451 or net46, this will behave as expected. But if the user switches to dotnet5.4, then ambient transactions will not throw.
  2. DbSet implementation of IListSource. This will surface as a compiler error because IListSource does not exist in the .NET Core contract.
natemcmaster commented 9 years ago

Furthermore, to support net45, we need all "Microsoft.Extensions.*" packages to downgrade to net45. This could be problematic if any depend on API changes between net451 and net45. I will investigate more...

natemcmaster commented 9 years ago

@divega how bad do we need net45? Basically, we'd need to rebase everything in aspnet down to net45.

cc @davidfowl

divega commented 9 years ago

I do remember we decided that long time ago but I can't remember if there was any tecnical reason besides being able to use EF in more scenarios. So it is hard for me to answer how bad we need it now.

Is it possible that Mono requird net45?

Cc @rowanmiller @ajcvickers

ErikEJ commented 9 years ago

@natemcmaster I can easily upgrade to net451 - I think there were some ADO.NET improvements, that you needed in that one anyway: https://msdn.microsoft.com/en-us/library/system.data.common.dbparameter(v=vs.110).aspx

rowanmiller commented 9 years ago

I don't think we required net45 for Mono... I think we just enabled it because it was minimal work to do so (the non-relational parts of the stack have always supported net45, and it was just some minimal changes in the relational packages).

From my perspective, net451 is fine (unless we find something that breaks in Mono etc.)

divega commented 9 years ago

We discussed this and we'll stick to net451 for RC1. If any issue arise we can consider having net45 again in RTM.

@erikej ADO.NET providers built for 4.5 should still work without changes because Precision and Scale were added in DbParameter with an implementation that invokes the pre-existing interfaces.

ErikEJ commented 9 years ago

@divega fine, but my question is: should the sqlce EF provider require .net 4,5 or .net 4,5,1?

divega commented 9 years ago

I believe it will need to be 4.5.1.

natemcmaster commented 9 years ago

Fixed UWP installation with #3558