convert from devexpress

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
hseifert
Posts: 1
Joined: Fri 12 Oct 2018 11:12

convert from devexpress

Post by hseifert » Fri 12 Oct 2018 11:44

Hello,
we are thinking about bying dotconnet for postgresql.
At the moment we are using xpo from devexpress. (what a shit)

Has anybody experience in converting projects from devexpress xpo databinding to the databinding with dotconnet for postgresql?

In our projects we are filling grids with a xpocollection.
Dim xpcLayout As New XPCollection(Of GHSDB2.sichten)
Dim Kriterium As CriteriaOperator = CriteriaOperator.And(
CriteriaOperator.Parse("str_programm = ?", vPrgName),
CriteriaOperator.Parse("str_gridview = ?", vGrid.ID),
CriteriaOperator.Parse("str_user = ?", vUser))
xpcLayout.Criteria = Kriterium
gridSichten.datasource=xpcLayout

What is an equivalent when we are using dotconnet for postgresql?

Shalex
Site Admin
Posts: 8474
Joined: Thu 14 Aug 2008 12:44

Re: convert from devexpress

Post by Shalex » Mon 15 Oct 2018 12:07

With dotConnect for PostgreSQL, you can use plain ADO.NET code (to construct SQL manually) or employ some of the supported ORM frameworks (EF Core, EFv6/v5/v4/v1, LinqConnect, NHibernate).

The most actively developed ORM at the moment is EF Core:

a) Target framework = .NET Framework
https://www.devart.com/dotconnect/postg ... First.html
https://www.devart.com/dotconnect/postg ... FCore.html

b) Target framework = .NET Core
https://www.devart.com/dotconnect/postg ... -Core.html
https://www.devart.com/dotconnect/postg ... TCore.html

Also be aware that dotConnect for PostgreSQL Professional includes Entity Developer (the Devart EF Core Model item, *.efml) that is a designer (Database First / Model First) and code generation tool for EF Core (and for other supported ORMs).
hseifert wrote:
Fri 12 Oct 2018 11:44
In our projects we are filling grids with a xpocollection.
Dim xpcLayout As New XPCollection(Of GHSDB2.sichten)
Dim Kriterium As CriteriaOperator = CriteriaOperator.And(
CriteriaOperator.Parse("str_programm = ?", vPrgName),
CriteriaOperator.Parse("str_gridview = ?", vGrid.ID),
CriteriaOperator.Parse("str_user = ?", vUser))
xpcLayout.Criteria = Kriterium
gridSichten.datasource=xpcLayout

What is an equivalent when we are using dotconnet for postgresql?
With EF Core, you can filter the result set this way in C# (ED includes VB template as well):

Code: Select all

  var context = new MyContext();
  var result = context.Emps.Where(x => x.Ename == "abcd" && x.Job == "efgh");
  gridSichten.datasource=result;
If this doesn't work, check the type of data source your gridSichten expects to receive.

Post Reply