sap-tutorials / Tutorials

Tutorials on sap.com
https://developers.sap.com/tutorial-navigator.html
Creative Commons Attribution 4.0 International
693 stars 766 forks source link

Connect Using the Microsoft Entity Framework Core (EF Core) #23474

Closed bobsys-mfleischer closed 3 months ago

bobsys-mfleischer commented 3 months ago

Tutorials: https://developers.sap.com/tutorials/hana-clients-entity-framework.html

The tutorial does not work. I have tested the whole thing on our On Premise version but EF Core simply does not create the tables! I used the same driver versions and EF Core version as in the tutorial.

HANA DB Version: 2.00.059.04.1655794895 (fa/hana2sp05)

image

bobsys-mfleischer commented 3 months ago

@danielva Does the tutorial not work with On Premise ?

MinghaiChang commented 3 months ago

Hello,

Yes, On Premise version is supported. But HANA 1 isn't supported. Can you post you sample code?

bobsys-mfleischer commented 3 months ago

I followed the tutorial exactly, so you can find the corresponding code there.

After hours of analysis + reflection, I was able to find the problem and a solution. After I added the value "CurrentSchema=*****" to the ConnectionString, it works.

danielva commented 3 months ago

Thank you for taking the time to comment and to post your solution. I was not able to reproduce the issue but have added the CurrentSchema parameter. It will appear in the next update to the tutorial.