.Net simple database - what to use?

This forum is meant for anything you would like to share with other visitors
User avatar
Phil Hepburn
Posts: 743
Joined: Sun Sep 11, 2016 2:16 pm

.Net simple database - what to use?

Post by Phil Hepburn »

Hi all,

I have been on line and searched for the 'DataProvider' to allow PostgreSQL to work with EF6 (plus) in our X# .NET code. Here it is :

https://schneide.wordpress.com/2017/09/ ... framework/

Wolfgang, what do we agree on ?

I try to deal in 'true' facts, and not opinions, that way I can be seen to be wrong less often ;-0)

So does that make me you and Dick at three points/corners of a triangle ???

Have a nice day,:whistle: :pinch: :ohmy: :lol:
Phil.
User avatar
wriedmann
Posts: 3755
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

.Net simple database - what to use?

Post by wriedmann »

Hi Phil,

yes, I know that PostgreSQL can be used with EF6.

Ok, I agree we very often have different opinions, but we also have very different needs. I have to guarantee the working of my application for another 15 or 20 years, so I'm very conservative adopting new tecnology. I cannot afford it to rewrite several applications because someone at Microsoft has decided to trash EF6 and come up with a incompatible next version. And most of my applications would not benefit from such a data layer as I put much
work in the GUI and in the logic, and have to aggregate data from very different sources.

Today a customer has confirmed the enhancement of his old VO application started more than 10 years ago (the last change was made about 7 years ago), and therefore the major part of my work for the next years will be work in VO or at least in X# using the VO GUI classes, and only a small (but increasing) part with WPF and newer tecnology.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
FFF
Posts: 1580
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

.Net simple database - what to use?

Post by FFF »

Phil,
AFAIU, you should have a look at http://www.npgsql.org/
- dotnet Provider for Postgres, i see tabs titled "Entity framework 6" and even "Entity framework Core" ;)

Karl
(now off to a heavy weekend in "culture" - one theatre, two operas, one ballett and a concert, including two full days of guided city viewing - now you know, why there's no time to code ;) )
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
User avatar
rjpajaron
Posts: 364
Joined: Fri Nov 06, 2015 12:01 am

.Net simple database - what to use?

Post by rjpajaron »

Hi Wolfgang and Phil (England version),

Our company have been using Devart dotConnect for PostgreSQL
(https://www.devart.com/dotconnect/postgresql/)

Yes, it supported EF6 and EF7 (EF Core) too. But my team that develop my MVC apps are using it with EF6 and it is smooth as butter to be poetic about it.

However, UWP is not supported. Their response to my query: ETA is unknown but they were considering it (maybe when MS return to mobile with Surface Always Connected PC?). But I do love the support for EF Core which we plan for next .NET Core evolution. I think there is no such as EF7 as it was called as EF Core now.

But what bothers me is lack of support for UWP as my mobile team already have Android and iOS apps on shared C# code with Xamarin Platform. Because of this, our UWP uses Npgsql instead. It is nice also but what lacks Npgsql years back that dotConnect already have for years is support for design time. I think Npgsql is doing great lately, Microsoft even openly supported during its demo of PostgreSQL instance of Azure Database.


EF6 is great, maybe this is route for my RDD for PostgreSQL using Devart dotConnect for PostgreSQL.

Regards,

Rene
User avatar
Phil Hepburn
Posts: 743
Joined: Sun Sep 11, 2016 2:16 pm

.Net simple database - what to use?

Post by Phil Hepburn »

Thanks for the info Karl - most useful.

Who is a LUCKY boy then - so much culture !!!

Enjoy it - and how did you know to celebrate my birthday ? Its on Tuesday ;-0)

Speak to you when you return 100% 'full' of class and culture :blink:

Regards,
Phil.

P.S. I am looking into PostgreSQL and related technologies, but not much time at the moment. Remember a wise man (on the news group) once said ... "Time, time, time ..." !
I wonder who that can be?
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

.Net simple database - what to use?

Post by ic2 »

I would like to thank everyone for the large number of suggestions. I think my best choice would be PostgreSQL, Johan Nel informed me about it earlier. Drawback is that it takes more time to learn as I know nothing about it (and also more effort to get it installed properly) and as the (now new) app I start doesn't rely too much on speed, a simple solution (XML, SQLite) will most likely do. SQLite is used widely (e.g. even in an Airbus A350 I read) so I decided to start as follows.

First I started writing the app in VO. This saves me a couple of hours working in VS. Then I'll port it to X# and change the database to SQLite - and see if I can use X# (or mix with C#) to create a Universal App.

For the latter I found this working sample:
https://code.msdn.microsoft.com/windows ... s-ad3af7ae

Of course that didn't work trouble free, we're still talking Visual Studio after all. After compiling I got:
Could not find SDK "SQLite.UWP.2015, Version=3.15.2". SqliteUWP

The usual search actions learned me that I had to install that via Tools ->Extensions and Updates. Fair enough, but to my surprise I had one installed already - version 3.8.11.1. So why does VS not use that? Solution seemed to be to edit the .csproj file:

<SDKReference Include="SQLite.UWP.2015, Version=3.8.11.1">
but I got the same error message.

I went back to Tools ->Extensions to (re)install SQLite and now it shows 2 x a SQLLite installation, see picture, the new one being 3.22.0. Again I had to hack the .cspoj file and now the sample works.
I consider this all a bit poor but no doubt it's considered by most as a sample how elaborate and modern Visual Studio is :P

Finally, I found that the sample stores the database in "C:UsersMyNameAppDataLocalPackages4523bad3-9a78-4567-ac13-d6ecc46f6397_ye3tcxqkrv090LocalStateContactsManager.sqlite"

which I think I can change in a W10 environment and probably not on a Windows 10 Phone but unfortunately that is not something I need to pay much attention to.

Dick
Attachments
SQLLite2.JPG
SQLLite2.JPG (66.19 KiB) Viewed 485 times
User avatar
wriedmann
Posts: 3755
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

.Net simple database - what to use?

Post by wriedmann »

Hi Dick,
Drawback is that it takes more time to learn as I know nothing about it (and also more effort to get it installed properly)
Installing PostgreSQL is absolutely easy, and if you don't plan to use any of its special features, it is like any other SQL database.

If there is some interest, I can share some of my SQL base classes.
First I started writing the app in VO. This saves me a couple of hours working in VS. Then I'll port it to X# and change the database to SQLite - and see if I can use X# (or mix with C#) to create a Universal App.
why don't start in XIDE, so you can use immediatly SQLite, and you can use also the X# language instead of the VO language.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

.Net simple database - what to use?

Post by ic2 »

Wolfgang Riedmann wrote:Hi Dick,

Installing PostgreSQL is absolutely easy, and if you don't plan to use any of its special features, it is like any other SQL database.
If there is some interest, I can share some of my SQL base classes.
That would be nice if you could mail it. Note that my idea is to make a UWP (Universal Windows App) which often limits options considerably. I do have that working UWP sample using SQLite so I know that this works in UWP while for PostgreSQL I don't.
why don't start in XIDE, so you can use immediately SQLite, and you can use also the X# language instead of the VO language.
Same story. In the end I have to publish the app through the Microsoft Store which requires VS. For setting up the app and the basic functionality I can use my existing VO code libs etc which takes far less time than starting it in .Net, and most likely still less time after converting while during that time I am able to work in VO instead of VS.

I actually quite regularly use VO to basically program Vulcan/X# programs. In can concentrate on the code of that one method I am working and after it's more or less ready I copy it into VS in which I hope I don't need to change much on it.

Dick
User avatar
wriedmann
Posts: 3755
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

.Net simple database - what to use?

Post by wriedmann »

Hi Dick,

I have sent you two XIDE export files, as I have no need for a Visual Studio solution.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

.Net simple database - what to use?

Post by ic2 »

Hello Wolfgang,

Thank you very much! A small problem I had is that it was not clear what to do with viAEF files. According to the help of Xide:

A number of files containing application templates, selectable from the Application Gallery when you create a new Application. Those files aren't normally modified by the user.

As I am so unfamiliar with Xide I don't know how I can organize the 2 projects to be read. Also I found that via the Import button in Xide, you can not select viAEF files, only vipef files. By typing *.* I managed nevertheless to import the viAEF files anyway but I am not sure how to get both in 1, what we call solution in VS or Repo in VO. But I can open the 2 projects separately and view the code and it is certainly going to be very helpful when I convert my VO program!

Dick
Post Reply