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?
convert from devexpress
Re: convert from devexpress
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).
If this doesn't work, check the type of data source your gridSichten expects to receive.
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).
With EF Core, you can filter the result set this way in C# (ED includes VB template as well):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?
Code: Select all
var context = new MyContext();
var result = context.Emps.Where(x => x.Ename == "abcd" && x.Job == "efgh");
gridSichten.datasource=result;