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

Support for .net Core and EF core? #118

Closed
Eneuman opened this Issue Mar 4, 2016 · 57 comments

Comments

Projects
None yet
@Eneuman

Eneuman commented Mar 4, 2016

Hi!

Will there be support for .Net Core and Entity Framework 7?
If so, when? :)

@jaredmoo

This comment has been minimized.

Show comment
Hide comment
@jaredmoo

jaredmoo Mar 4, 2016

Member

Hi, thanks for the request! We have no plans to implement this in the near future, but the code is open-source so if you'd like to give it a try yourself I'd be happy to work with you on getting it merged. :)

Member

jaredmoo commented Mar 4, 2016

Hi, thanks for the request! We have no plans to implement this in the near future, but the code is open-source so if you'd like to give it a try yourself I'd be happy to work with you on getting it merged. :)

@andrelmp

This comment has been minimized.

Show comment
Hide comment
@andrelmp

andrelmp Apr 6, 2016

i tryed, but is pretty impossible now, .net core RC1 doesnt have IDataReader and IDataRecord interfaces also SqlDataReader.GetSchemaTable() is missing.

I will look into again when RC2 comes out

andrelmp commented Apr 6, 2016

i tryed, but is pretty impossible now, .net core RC1 doesnt have IDataReader and IDataRecord interfaces also SqlDataReader.GetSchemaTable() is missing.

I will look into again when RC2 comes out

@abatishchev

This comment has been minimized.

Show comment
Hide comment
@abatishchev

abatishchev Sep 18, 2016

Any chance you could take a look at EF Core 1.0 please? Also I'd rename the title, from EF7 to EF Core.

abatishchev commented Sep 18, 2016

Any chance you could take a look at EF Core 1.0 please? Also I'd rename the title, from EF7 to EF Core.

@jaredmoo jaredmoo changed the title from Support for .net Core and EF7 ? to Support for .net Core and EF core? Sep 20, 2016

@jaredmoo

This comment has been minimized.

Show comment
Hide comment
@jaredmoo

jaredmoo Sep 20, 2016

Member

Awesome, thanks @pristinesource ! Our build situation is a little weird but I'll see if I can slip the .xproj etc that you created into our codebase so we don't end up with 2 parallel codebases.

Member

jaredmoo commented Sep 20, 2016

Awesome, thanks @pristinesource ! Our build situation is a little weird but I'll see if I can slip the .xproj etc that you created into our codebase so we don't end up with 2 parallel codebases.

@pristinesource

This comment has been minimized.

Show comment
Hide comment
@pristinesource

pristinesource Sep 21, 2016

Contributor

Awesome! There were certainly a lot more changes than just the project file. I will do 2 commits, one reverting all changes and another reapplying all changes to you can see everything I did in one commit. The way Net Core projects work though, I had to create a whole new project and copy the source files to it instead of modifying the existing project. I will add another comment here after I make those 2 commits with a link to the diff.

Contributor

pristinesource commented Sep 21, 2016

Awesome! There were certainly a lot more changes than just the project file. I will do 2 commits, one reverting all changes and another reapplying all changes to you can see everything I did in one commit. The way Net Core projects work though, I had to create a whole new project and copy the source files to it instead of modifying the existing project. I will add another comment here after I make those 2 commits with a link to the diff.

@pristinesource

This comment has been minimized.

Show comment
Hide comment
@pristinesource

pristinesource Sep 21, 2016

Contributor

@jaredmoo, I have created a single commit that has all of the changes. I realized that a huge part of it was the namespace refactor, but if you ignore that, you can see all of the work I did to get this library to work with .Net Core. I hope this helps and I would LOVE to see an official .Net Core version soon :)

pristinesource/ElasticDatabaseToolsNetCore@4d4917f

Contributor

pristinesource commented Sep 21, 2016

@jaredmoo, I have created a single commit that has all of the changes. I realized that a huge part of it was the namespace refactor, but if you ignore that, you can see all of the work I did to get this library to work with .Net Core. I hope this helps and I would LOVE to see an official .Net Core version soon :)

pristinesource/ElasticDatabaseToolsNetCore@4d4917f

@jaredmoo

This comment has been minimized.

Show comment
Hide comment
@jaredmoo

jaredmoo Sep 21, 2016

Member

Hey, I'm working through the changes and it all makes sense except for the change to MultiShardDataReader.Close() to make it not override. Do you understand what's going on here? DbDataReader has virtual void Close() defined, I don't understand why it can't be overridden.

Member

jaredmoo commented Sep 21, 2016

Hey, I'm working through the changes and it all makes sense except for the change to MultiShardDataReader.Close() to make it not override. Do you understand what's going on here? DbDataReader has virtual void Close() defined, I don't understand why it can't be overridden.

@pristinesource

This comment has been minimized.

Show comment
Hide comment
@pristinesource

pristinesource Sep 21, 2016

Contributor

@jaredmoo: That is very strange, when I try to add "override" back to the method declaration in VS2015 it gives the error that there is no valid method to override. When I look at the API docs for the DbDataReader it does say that there is a Close() method and it is virtual https://docs.microsoft.com/en-us/dotnet/core/api/system.data.common.dbdatareader#System_Data_Common_DbDataReader_Close, so I am not sure what the discrepancy is on my end. Are you seeing any similar behavior when you open my project directly?
screenshot 2016-09-21 16 26 55
screenshot 2016-09-21 16 29 21

Contributor

pristinesource commented Sep 21, 2016

@jaredmoo: That is very strange, when I try to add "override" back to the method declaration in VS2015 it gives the error that there is no valid method to override. When I look at the API docs for the DbDataReader it does say that there is a Close() method and it is virtual https://docs.microsoft.com/en-us/dotnet/core/api/system.data.common.dbdatareader#System_Data_Common_DbDataReader_Close, so I am not sure what the discrepancy is on my end. Are you seeing any similar behavior when you open my project directly?
screenshot 2016-09-21 16 26 55
screenshot 2016-09-21 16 29 21

@jaredmoo

This comment has been minimized.

Show comment
Hide comment
@jaredmoo

jaredmoo Sep 21, 2016

Member

Yes I see the same thing. What's also weird is that when I press F12 on DbDataReader, VS shows me the metadata with no .Close method. So I think that somehow DbDataReader class that is being referenced is not the same as the source that I just linked. Very baffling.

Member

jaredmoo commented Sep 21, 2016

Yes I see the same thing. What's also weird is that when I press F12 on DbDataReader, VS shows me the metadata with no .Close method. So I think that somehow DbDataReader class that is being referenced is not the same as the source that I just linked. Very baffling.

@jaredmoo

This comment has been minimized.

Show comment
Hide comment
@jaredmoo

jaredmoo Sep 21, 2016

Member

Also these errors makes no sense. DbDataReader inherits IDataReader, which contains .Close().

error

Member

jaredmoo commented Sep 21, 2016

Also these errors makes no sense. DbDataReader inherits IDataReader, which contains .Close().

error

@pristinesource

This comment has been minimized.

Show comment
Hide comment
@pristinesource

pristinesource Sep 21, 2016

Contributor

@jaredmoo: It has confused me a lot also even with other stuff in .Net Core. Take for example if you attempt to open the referenced DLL (the comment at the top of F12) in ILSpy it only gives the structure (which matches F12 output and that is correct because it is a reference DLL), but I cannot find the real library that matches the reference DLL. I am not sure what the true referenced assembly is in this case, if it is the corefx library then it does have the Close() method (according to ILSpy), but that is not what VS2015 and the compiler see/use.

Contributor

pristinesource commented Sep 21, 2016

@jaredmoo: It has confused me a lot also even with other stuff in .Net Core. Take for example if you attempt to open the referenced DLL (the comment at the top of F12) in ILSpy it only gives the structure (which matches F12 output and that is correct because it is a reference DLL), but I cannot find the real library that matches the reference DLL. I am not sure what the true referenced assembly is in this case, if it is the corefx library then it does have the Close() method (according to ILSpy), but that is not what VS2015 and the compiler see/use.

@jaredmoo

This comment has been minimized.

Show comment
Hide comment
@jaredmoo

jaredmoo Sep 21, 2016

Member

Hmm yeah maybe the reference assembly that VS is using is not correct? I'll try contacting .net core folks. btw my working branch is https://github.com/jaredmoo/elastic-db-tools/tree/NetCore

Member

jaredmoo commented Sep 21, 2016

Hmm yeah maybe the reference assembly that VS is using is not correct? I'll try contacting .net core folks. btw my working branch is https://github.com/jaredmoo/elastic-db-tools/tree/NetCore

@pristinesource

This comment has been minimized.

Show comment
Hide comment
@pristinesource

pristinesource Sep 21, 2016

Contributor

@jaredmoo: Awesome! Then maybe all of the calls to *.Close() can be uncommented too ;)

Contributor

pristinesource commented Sep 21, 2016

@jaredmoo: Awesome! Then maybe all of the calls to *.Close() can be uncommented too ;)

@jaredmoo

This comment has been minimized.

Show comment
Hide comment
@jaredmoo
Member

jaredmoo commented Sep 21, 2016

@jaredmoo

This comment has been minimized.

Show comment
Hide comment
@jaredmoo

jaredmoo Sep 21, 2016

Member

Apparently Close() should be replaced with Dispose(), see dotnet/corefx#11949. Since there are a lot of issues in MSQ, I totally disabled MSQ for now. The good news is that SMM now builds successfully in https://github.com/jaredmoo/elastic-db-tools/tree/NetCore . Next step is to get the SMM tests to build so that we can find out if these compile fixes actually produced an assembly that works good :)

Member

jaredmoo commented Sep 21, 2016

Apparently Close() should be replaced with Dispose(), see dotnet/corefx#11949. Since there are a lot of issues in MSQ, I totally disabled MSQ for now. The good news is that SMM now builds successfully in https://github.com/jaredmoo/elastic-db-tools/tree/NetCore . Next step is to get the SMM tests to build so that we can find out if these compile fixes actually produced an assembly that works good :)

@jaredmoo

This comment has been minimized.

Show comment
Hide comment
@jaredmoo

jaredmoo Sep 22, 2016

Member

Ok, unit tests are going to be messy due to usage of fakes. One more reason for me to dislike fakes :)

That's about as far as I can get today, and unfortunately I don't expect I will be able to get back to this for a little while. If you want to make changes on top of https://github.com/jaredmoo/elastic-db-tools/tree/NetCore please go ahead and I'll be happy to review. Just try to make each individual commit small so that it's reviewable.

Cheers

Member

jaredmoo commented Sep 22, 2016

Ok, unit tests are going to be messy due to usage of fakes. One more reason for me to dislike fakes :)

That's about as far as I can get today, and unfortunately I don't expect I will be able to get back to this for a little while. If you want to make changes on top of https://github.com/jaredmoo/elastic-db-tools/tree/NetCore please go ahead and I'll be happy to review. Just try to make each individual commit small so that it's reviewable.

Cheers

@pristinesource

This comment has been minimized.

Show comment
Hide comment
@pristinesource

pristinesource Sep 23, 2016

Contributor

@jaredmoo: How do you feel about me switching to xUnit for unit tests while I am updating them to work with the new changes for Net Core?

Contributor

pristinesource commented Sep 23, 2016

@jaredmoo: How do you feel about me switching to xUnit for unit tests while I am updating them to work with the new changes for Net Core?

@jaredmoo

This comment has been minimized.

Show comment
Hide comment
@jaredmoo

jaredmoo Sep 23, 2016

Member

That would be fine, but if possible would you be able to do that on a separate branch based on master (separate from net core changes)? So the branching is like

master -> net core     /-> net core with tests
      \-> xunit      -/

The reason that I ask is that it would be nice to be able to merge xunit into master independently of net core.

Also the latest xunit version that is available on my build servers is 2.1.0, will that work?

Member

jaredmoo commented Sep 23, 2016

That would be fine, but if possible would you be able to do that on a separate branch based on master (separate from net core changes)? So the branching is like

master -> net core     /-> net core with tests
      \-> xunit      -/

The reason that I ask is that it would be nice to be able to merge xunit into master independently of net core.

Also the latest xunit version that is available on my build servers is 2.1.0, will that work?

@pristinesource

This comment has been minimized.

Show comment
Hide comment
@pristinesource

pristinesource Sep 23, 2016

Contributor

Absolutely! I will do that :)

Contributor

pristinesource commented Sep 23, 2016

Absolutely! I will do that :)

@jaredmoo

This comment has been minimized.

Show comment
Hide comment
@jaredmoo

jaredmoo Sep 23, 2016

Member

Awesome, thanks!

Member

jaredmoo commented Sep 23, 2016

Awesome, thanks!

@jaredmoo

This comment has been minimized.

Show comment
Hide comment
@jaredmoo

jaredmoo Oct 2, 2016

Member

Removed fakes dependency: #143

Member

jaredmoo commented Oct 2, 2016

Removed fakes dependency: #143

@JohnGalt1717

This comment has been minimized.

Show comment
Hide comment
@JohnGalt1717

JohnGalt1717 Nov 26, 2016

Are there any samples or guidance on how to setup constructors and dependency injection etc. in .NET core yet?

JohnGalt1717 commented Nov 26, 2016

Are there any samples or guidance on how to setup constructors and dependency injection etc. in .NET core yet?

@grajdeanserghei

This comment has been minimized.

Show comment
Hide comment
@grajdeanserghei

grajdeanserghei Mar 9, 2017

Hi!

Are there any updates on this issue?

@jaredmoo I can see that https://github.com/jaredmoo/elastic-db-tools contains NetCore branch and two pull requests related to it created by @pristinesource. Why it is not merged in this repository and not included in NuGet package? Do you need any help with that?

Are there any plans to support this library? It haven't been updated since October.

grajdeanserghei commented Mar 9, 2017

Hi!

Are there any updates on this issue?

@jaredmoo I can see that https://github.com/jaredmoo/elastic-db-tools contains NetCore branch and two pull requests related to it created by @pristinesource. Why it is not merged in this repository and not included in NuGet package? Do you need any help with that?

Are there any plans to support this library? It haven't been updated since October.

@jaredmoo

This comment has been minimized.

Show comment
Hide comment
@jaredmoo

jaredmoo Nov 9, 2017

Member

I'm very sorry for your frustration. I don't believe I ever stated that this work would be done "soon", and I'm sorry you had that impression.

As stated in my most recent post in this thread ( #118 (comment) ), there is working code at https://github.com/jaredmoo/elastic-db-tools/tree/NetCore which you can build and use. Since then I have resolved the MSQ test failures, and just now I have pushed the code to https://github.com/Azure/elastic-db-tools/tree/NetCore

The remaining coding task is to fix csproj's so they build against both net451 (for perfcounter support) and netstandard. I don't know exactly how to do this, but I know that the Azure management SDKs are built this way so it can be figured out by looking at https://github.com/Azure/azure-sdk-for-net/blob/psSdkJson6/src/SDKs/SqlManagement/Management.Sql/Microsoft.Azure.Management.Sql.csproj

Then there is work to get the code signed and published on nuget. This unfortunately cannot be done by community. Lack of signing is also why I have not made an alpha binary release, but luckily since it's open source you can easily grab the code and build it easily with dotnet build.

Member

jaredmoo commented Nov 9, 2017

I'm very sorry for your frustration. I don't believe I ever stated that this work would be done "soon", and I'm sorry you had that impression.

As stated in my most recent post in this thread ( #118 (comment) ), there is working code at https://github.com/jaredmoo/elastic-db-tools/tree/NetCore which you can build and use. Since then I have resolved the MSQ test failures, and just now I have pushed the code to https://github.com/Azure/elastic-db-tools/tree/NetCore

The remaining coding task is to fix csproj's so they build against both net451 (for perfcounter support) and netstandard. I don't know exactly how to do this, but I know that the Azure management SDKs are built this way so it can be figured out by looking at https://github.com/Azure/azure-sdk-for-net/blob/psSdkJson6/src/SDKs/SqlManagement/Management.Sql/Microsoft.Azure.Management.Sql.csproj

Then there is work to get the code signed and published on nuget. This unfortunately cannot be done by community. Lack of signing is also why I have not made an alpha binary release, but luckily since it's open source you can easily grab the code and build it easily with dotnet build.

@erick-thompson

This comment has been minimized.

Show comment
Hide comment
@erick-thompson

erick-thompson Nov 21, 2017

I was able to get the core branch up and running, but I ran into an issue when creating the ShardMapManager. The call

var manager = ShardMapManagerFactory.GetSqlShardMapManager("", ShardMapManagerLoadPolicy.Eager);
results in a Linq exception "Sequence contains no elements"

System.InvalidOperationException occurred
HResult=0x80131509
Message=Sequence contains no elements
Source=System.Linq
StackTrace:
at System.Linq.Enumerable.Single[TSource](IEnumerable1 source) at Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.GetShardMapManagerGlobalOperation.DoGlobalExecute(IStoreTransactionScope ts) in P:\external\elastic-db-tools\Src\ElasticScale.Client\ShardManagement\StoreOperations\ShardMapManagerFactory\GetShardMapManagerGlobalOperation.cs:line 51 at Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.StoreOperationGlobal.<Do>b__10_0() in P:\external\elastic-db-tools\Src\ElasticScale.Client\ShardManagement\StoreOperations\Base\StoreOperationGlobal.cs:line 83 at Microsoft.Azure.SqlDatabase.ElasticScale.TransientFaultHandling.RetryPolicy.ExecuteAction[TResult](Func1 func) in P:\external\elastic-db-tools\Src\ElasticScale.Client\ElasticScale.Common\TransientFaultHandling\Implementation\RetryPolicy.cs:line 216
at Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.StoreOperationGlobal.Do() in P:\external\elastic-db-tools\Src\ElasticScale.Client\ShardManagement\StoreOperations\Base\StoreOperationGlobal.cs:line 73
at Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.ShardMapManagerFactory.GetSqlShardMapManager(String connectionString, ShardMapManagerLoadPolicy loadPolicy, RetryBehavior retryBehavior, EventHandler1 retryEventHandler, Boolean throwOnFailure) in P:\external\elastic-db-tools\Src\ElasticScale.Client\ShardManagement\ShardMapManager\ShardMapManagerFactory.cs:line 580 at Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.ShardMapManagerFactory.GetSqlShardMapManager(String connectionString, ShardMapManagerLoadPolicy loadPolicy, RetryBehavior retryBehavior, EventHandler1 retryEventHandler) in P:\external\elastic-db-tools\Src\ElasticScale.Client\ShardManagement\ShardMapManager\ShardMapManagerFactory.cs:line 508
at Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.ShardMapManagerFactory.GetSqlShardMapManager(String connectionString, ShardMapManagerLoadPolicy loadPolicy, RetryBehavior retryBehavior) in P:\external\elastic-db-tools\Src\ElasticScale.Client\ShardManagement\ShardMapManager\ShardMapManagerFactory.cs:line 463
at Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.ShardMapManagerFactory.GetSqlShardMapManager(String connectionString, ShardMapManagerLoadPolicy loadPolicy) in P:\external\elastic-db-tools\Src\ElasticScale.Client\ShardManagement\ShardMapManager\ShardMapManagerFactory.cs:line 442
at SharedServices.QuantumShardMapManager.GetShardMap() in P:\quantumeventservice\SharedServices\Repositories\QuantumShardMapManager.cs:line 23
at SharedServices.Tests.Repositories.QuantumShardMapManagerTests.Test1() in P:\quantumeventservice\SharedServices.Tests\Repositories\QuantumShardMapManagerTests.cs:line 17

It looks like it is coming out of the SqlUtils class. I see that the SQL command is embedded in ReadOnlyScripts.resx. I'm going to see if I can get it working locally, but I assume that any of the SQL inside the resources will have similar issues.

erick-thompson commented Nov 21, 2017

I was able to get the core branch up and running, but I ran into an issue when creating the ShardMapManager. The call

var manager = ShardMapManagerFactory.GetSqlShardMapManager("", ShardMapManagerLoadPolicy.Eager);
results in a Linq exception "Sequence contains no elements"

System.InvalidOperationException occurred
HResult=0x80131509
Message=Sequence contains no elements
Source=System.Linq
StackTrace:
at System.Linq.Enumerable.Single[TSource](IEnumerable1 source) at Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.GetShardMapManagerGlobalOperation.DoGlobalExecute(IStoreTransactionScope ts) in P:\external\elastic-db-tools\Src\ElasticScale.Client\ShardManagement\StoreOperations\ShardMapManagerFactory\GetShardMapManagerGlobalOperation.cs:line 51 at Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.StoreOperationGlobal.<Do>b__10_0() in P:\external\elastic-db-tools\Src\ElasticScale.Client\ShardManagement\StoreOperations\Base\StoreOperationGlobal.cs:line 83 at Microsoft.Azure.SqlDatabase.ElasticScale.TransientFaultHandling.RetryPolicy.ExecuteAction[TResult](Func1 func) in P:\external\elastic-db-tools\Src\ElasticScale.Client\ElasticScale.Common\TransientFaultHandling\Implementation\RetryPolicy.cs:line 216
at Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.StoreOperationGlobal.Do() in P:\external\elastic-db-tools\Src\ElasticScale.Client\ShardManagement\StoreOperations\Base\StoreOperationGlobal.cs:line 73
at Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.ShardMapManagerFactory.GetSqlShardMapManager(String connectionString, ShardMapManagerLoadPolicy loadPolicy, RetryBehavior retryBehavior, EventHandler1 retryEventHandler, Boolean throwOnFailure) in P:\external\elastic-db-tools\Src\ElasticScale.Client\ShardManagement\ShardMapManager\ShardMapManagerFactory.cs:line 580 at Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.ShardMapManagerFactory.GetSqlShardMapManager(String connectionString, ShardMapManagerLoadPolicy loadPolicy, RetryBehavior retryBehavior, EventHandler1 retryEventHandler) in P:\external\elastic-db-tools\Src\ElasticScale.Client\ShardManagement\ShardMapManager\ShardMapManagerFactory.cs:line 508
at Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.ShardMapManagerFactory.GetSqlShardMapManager(String connectionString, ShardMapManagerLoadPolicy loadPolicy, RetryBehavior retryBehavior) in P:\external\elastic-db-tools\Src\ElasticScale.Client\ShardManagement\ShardMapManager\ShardMapManagerFactory.cs:line 463
at Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement.ShardMapManagerFactory.GetSqlShardMapManager(String connectionString, ShardMapManagerLoadPolicy loadPolicy) in P:\external\elastic-db-tools\Src\ElasticScale.Client\ShardManagement\ShardMapManager\ShardMapManagerFactory.cs:line 442
at SharedServices.QuantumShardMapManager.GetShardMap() in P:\quantumeventservice\SharedServices\Repositories\QuantumShardMapManager.cs:line 23
at SharedServices.Tests.Repositories.QuantumShardMapManagerTests.Test1() in P:\quantumeventservice\SharedServices.Tests\Repositories\QuantumShardMapManagerTests.cs:line 17

It looks like it is coming out of the SqlUtils class. I see that the SQL command is embedded in ReadOnlyScripts.resx. I'm going to see if I can get it working locally, but I assume that any of the SQL inside the resources will have similar issues.

@jaredmoo

This comment has been minimized.

Show comment
Hide comment
@jaredmoo

jaredmoo Nov 21, 2017

Member

I've been having a similar problem with the resources but I thought it was fixed. Let me take another look.

Member

jaredmoo commented Nov 21, 2017

I've been having a similar problem with the resources but I thought it was fixed. Let me take another look.

@jaredmoo

This comment has been minimized.

Show comment
Hide comment
@jaredmoo

jaredmoo Nov 21, 2017

Member

The issue is Microsoft/msbuild#308 . The resources build correctly in VS but not using dotnet core SDK. Investigating fixes/workarounds.

Member

jaredmoo commented Nov 21, 2017

The issue is Microsoft/msbuild#308 . The resources build correctly in VS but not using dotnet core SDK. Investigating fixes/workarounds.

@erick-thompson

This comment has been minimized.

Show comment
Hide comment
@erick-thompson

erick-thompson Nov 21, 2017

Nice find! It there a particular reason why interned strings aren't an option? Or are you using the locales for various flavors of SQL?

erick-thompson commented Nov 21, 2017

Nice find! It there a particular reason why interned strings aren't an option? Or are you using the locales for various flavors of SQL?

@jaredmoo

This comment has been minimized.

Show comment
Hide comment
@jaredmoo

jaredmoo Nov 22, 2017

Member

Resx was used for developer convenience, but it's not very convenient now that resx build isn't working. I just pushed an update that switches to hardcoded strings.

Member

jaredmoo commented Nov 22, 2017

Resx was used for developer convenience, but it's not very convenient now that resx build isn't working. I just pushed an update that switches to hardcoded strings.

@erick-thompson

This comment has been minimized.

Show comment
Hide comment
@erick-thompson

erick-thompson Nov 22, 2017

Awesome, thanks. I'll pull you changes and rebuild.

erick-thompson commented Nov 22, 2017

Awesome, thanks. I'll pull you changes and rebuild.

@GreenAirplane

This comment has been minimized.

Show comment
Hide comment
@GreenAirplane

GreenAirplane Dec 4, 2017

We are starting a new big project and we would like to use elastic tools instead of our own tool. So, my question is: @jaredmoo, do you need any community help in order to speed up the release of .net standard support?

GreenAirplane commented Dec 4, 2017

We are starting a new big project and we would like to use elastic tools instead of our own tool. So, my question is: @jaredmoo, do you need any community help in order to speed up the release of .net standard support?

@jaredmoo

This comment has been minimized.

Show comment
Hide comment
@jaredmoo

jaredmoo Dec 4, 2017

Member

Just try it out and let me know if you have any issues, also it would be great to hear if everything worked :) . The only thing left to do is signing and publishing an official release, which unfortunately can't be done by community.

Member

jaredmoo commented Dec 4, 2017

Just try it out and let me know if you have any issues, also it would be great to hear if everything worked :) . The only thing left to do is signing and publishing an official release, which unfortunately can't be done by community.

@GreenAirplane

This comment has been minimized.

Show comment
Hide comment
@GreenAirplane

GreenAirplane Dec 8, 2017

Just wanted to provide an update. We've created a "proof of concept" application and looks like it works for us! We are using Elastic Tools with EF Core and so far so good.

Btw, there was one time when some stored procedures were not created in a shard db (e.g. spBulkOperationShardMappingsLocal). However, I was not able to reproduce it again. Also, I've found issue #147 with a similar description, so I don't think that this case is related to .net standard support.

GreenAirplane commented Dec 8, 2017

Just wanted to provide an update. We've created a "proof of concept" application and looks like it works for us! We are using Elastic Tools with EF Core and so far so good.

Btw, there was one time when some stored procedures were not created in a shard db (e.g. spBulkOperationShardMappingsLocal). However, I was not able to reproduce it again. Also, I've found issue #147 with a similar description, so I don't think that this case is related to .net standard support.

@GreenAirplane

This comment has been minimized.

Show comment
Hide comment
@GreenAirplane

GreenAirplane Dec 19, 2017

One more thing, it might help some other people who decide to use pre-release version.

We had a strange issue when this lib didn't work in a new solution. It just crashed with "Could not load file or assembly" error. It looks like there is an issue in VS 2017 and .net core how they work with libs from local disk. The easy way to fix is to generate a local NuGet package and add it to the new solution. Works like a miracle..

GreenAirplane commented Dec 19, 2017

One more thing, it might help some other people who decide to use pre-release version.

We had a strange issue when this lib didn't work in a new solution. It just crashed with "Could not load file or assembly" error. It looks like there is an issue in VS 2017 and .net core how they work with libs from local disk. The easy way to fix is to generate a local NuGet package and add it to the new solution. Works like a miracle..

@TomBeckett

This comment has been minimized.

Show comment
Hide comment
@TomBeckett

TomBeckett Dec 23, 2017

Any update on when this may be signed / published as an official release?

TomBeckett commented Dec 23, 2017

Any update on when this may be signed / published as an official release?

@drewauman

This comment has been minimized.

Show comment
Hide comment
@drewauman

drewauman Dec 31, 2017

Can you let us know when this is going to be signed and published? Looking forward to it!

drewauman commented Dec 31, 2017

Can you let us know when this is going to be signed and published? Looking forward to it!

@jaredmoo

This comment has been minimized.

Show comment
Hide comment
Member

jaredmoo commented Feb 16, 2018

@jaredmoo jaredmoo closed this Feb 16, 2018

@RJM76

This comment has been minimized.

Show comment
Hide comment
@RJM76

RJM76 May 17, 2018

Are any Entity Framework Core samples available?

I'm using 2.0.0-preview2 from Nuget but getting stuck on Database.SetInitializer<MyDbContext>(...) in both the SetInitializerForConnection and CreateDDRConnection methods. This is because the samples aren't using EF Core so System.Data.Entity is not available. And in EF Core it appears the equivalent is DatabaseFacade, although they do not line up in terms if initialization.

For example, calling 'Database.SetInitializer<MyDbContext>(null);' from CreateDDRConnection results in a "An object reference is required for the non-static field, method, or property 'DbContext.Database'" error.

RJM76 commented May 17, 2018

Are any Entity Framework Core samples available?

I'm using 2.0.0-preview2 from Nuget but getting stuck on Database.SetInitializer<MyDbContext>(...) in both the SetInitializerForConnection and CreateDDRConnection methods. This is because the samples aren't using EF Core so System.Data.Entity is not available. And in EF Core it appears the equivalent is DatabaseFacade, although they do not line up in terms if initialization.

For example, calling 'Database.SetInitializer<MyDbContext>(null);' from CreateDDRConnection results in a "An object reference is required for the non-static field, method, or property 'DbContext.Database'" error.

@jaredmoo

This comment has been minimized.

Show comment
Hide comment
@jaredmoo

jaredmoo May 17, 2018

Member

Sorry I haven't gotten a chance to try with EF core :(

Member

jaredmoo commented May 17, 2018

Sorry I haven't gotten a chance to try with EF core :(

@bbqchickenrobot

This comment has been minimized.

Show comment
Hide comment
@bbqchickenrobot

bbqchickenrobot Jun 21, 2018

In case anyone was wondering I whipped a quick EFCore sample to use with preview-2.0.0 build.... it's not perfect and/or tested - but if you wanted to understand the concept I created a Gist here:

Azure Elastic Scale Client and EFCore 2.1

Let me know how it works. Hope that helps....

bbqchickenrobot commented Jun 21, 2018

In case anyone was wondering I whipped a quick EFCore sample to use with preview-2.0.0 build.... it's not perfect and/or tested - but if you wanted to understand the concept I created a Gist here:

Azure Elastic Scale Client and EFCore 2.1

Let me know how it works. Hope that helps....

@drewauman

This comment has been minimized.

Show comment
Hide comment
@drewauman

drewauman Jun 23, 2018

Could anyone send a full working sample of sharding with EF 7 Core? I have to admit, I have been banging on this thing off and on for way too long. Would be very helpful if someone has a working sample. Would be a huge help here ... I want multiple Azure database in an elastic pool, multiple tenants per database with the ability to filter at the database level and to do split/merge to move tenants from database to database as needed. Help! :) Thank you ahead of time, I appreciate the help. Feel free to send it directly to me at drewauman [at] outlook.com if you could. Thanks!!

drewauman commented Jun 23, 2018

Could anyone send a full working sample of sharding with EF 7 Core? I have to admit, I have been banging on this thing off and on for way too long. Would be very helpful if someone has a working sample. Would be a huge help here ... I want multiple Azure database in an elastic pool, multiple tenants per database with the ability to filter at the database level and to do split/merge to move tenants from database to database as needed. Help! :) Thank you ahead of time, I appreciate the help. Feel free to send it directly to me at drewauman [at] outlook.com if you could. Thanks!!

@bbqchickenrobot

This comment has been minimized.

Show comment
Hide comment
@bbqchickenrobot

bbqchickenrobot Jun 26, 2018

@drewauman - I provided a full working sample. Create your DbContext from your database, create your shards and then you can use my gist to talk with it. I don't have a working sample as this would require to create a database, configure sharding (this is done within azure sql), etc....

Assuming you are using this tool + Entity Framework Core + Entity Migrations you may want to check this out to help you get started pretty quickly creating a database:

Entity Migrations w/ Elastic Scale Client

bbqchickenrobot commented Jun 26, 2018

@drewauman - I provided a full working sample. Create your DbContext from your database, create your shards and then you can use my gist to talk with it. I don't have a working sample as this would require to create a database, configure sharding (this is done within azure sql), etc....

Assuming you are using this tool + Entity Framework Core + Entity Migrations you may want to check this out to help you get started pretty quickly creating a database:

Entity Migrations w/ Elastic Scale Client

@drewauman

This comment has been minimized.

Show comment
Hide comment
@drewauman

drewauman Jul 4, 2018

Thank BBQ .... I have got this working several times in the past using Entity Framework. It's Entity Framework "Core" that I have had a hard time finding documentation and/or examples for. I have my solution setup, I just seem to be having issues creating the schema the first time in the shardlet DBs .... it is driving me crazy! ha ha and it's probably something simple that is causing it. That's why I was asking for a working version (I was just looking for the code or solution).

The downloadable example that is provided in the link that you sent is entity framework 6 it appears, not core. Thoughts? Thanks for your time sir!

drewauman commented Jul 4, 2018

Thank BBQ .... I have got this working several times in the past using Entity Framework. It's Entity Framework "Core" that I have had a hard time finding documentation and/or examples for. I have my solution setup, I just seem to be having issues creating the schema the first time in the shardlet DBs .... it is driving me crazy! ha ha and it's probably something simple that is causing it. That's why I was asking for a working version (I was just looking for the code or solution).

The downloadable example that is provided in the link that you sent is entity framework 6 it appears, not core. Thoughts? Thanks for your time sir!

@drewauman

This comment has been minimized.

Show comment
Hide comment
@drewauman

drewauman Jul 8, 2018

I can't seem to figure out how to add migrations for the first time or kick off migrations for the first time and then subsequent times into the shard database. I am in a Entity Framework Core Code First setup. I need to initialize migrations for the first time and then migrate automatically every time new migrations are added. Thoughts?

drewauman commented Jul 8, 2018

I can't seem to figure out how to add migrations for the first time or kick off migrations for the first time and then subsequent times into the shard database. I am in a Entity Framework Core Code First setup. I need to initialize migrations for the first time and then migrate automatically every time new migrations are added. Thoughts?

@mawadallah

This comment has been minimized.

Show comment
Hide comment
@mawadallah

mawadallah Aug 12, 2018

is there any documentation for using it with EntityFrameworkCore?

mawadallah commented Aug 12, 2018

is there any documentation for using it with EntityFrameworkCore?

@SychevIgor

This comment has been minimized.

Show comment
Hide comment
@SychevIgor

SychevIgor Oct 16, 2018

Thank you for everything you did!
It will be nice to have a version without "preview" in the end
https://github.com/Azure/elastic-db-tools/tags here we can find only preview-2 that was shipped in February 2018... 8th month ago.

SychevIgor commented Oct 16, 2018

Thank you for everything you did!
It will be nice to have a version without "preview" in the end
https://github.com/Azure/elastic-db-tools/tags here we can find only preview-2 that was shipped in February 2018... 8th month ago.

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