3.0.16 => 4.2 transition

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
listonic
Posts: 39
Joined: Mon 06 Dec 2010 15:47

3.0.16 => 4.2 transition

Post by listonic » Fri 09 Aug 2013 13:19

I am using Linq Connect 3.0.16, i tried to upgrade to 4.2.306.

I have my custom DataProvider which Extends SqlDataProvider and method

protected override IDbCommand CreateCommand(string commandText, IDbConnection connection, bool forBatch)

However this method does not exist in SqlDataProvider in 4.2.306.

How to create same module in version 4.2.306 (a way to provide custom implementation of IDbCommand? )

Regards
Piotr Wójcicki

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: 3.0.16 => 4.2 transition

Post by MariiaI » Mon 12 Aug 2013 10:41

Thank you for the report on this. This issue relates to the fact that we have made a major refactoring of the LinqConnect engine since version 4.0.10. We are investigating this issue and inform you about the results as soon as possible.
Please also tell us if you lack some other features in the new version of LinqConnect.

listonic
Posts: 39
Joined: Mon 06 Dec 2010 15:47

Re: 3.0.16 => 4.2 transition

Post by listonic » Thu 15 Aug 2013 14:06

So basically it is impossible to do what i need with the new version?

Seriously, not proffesional.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: 3.0.16 => 4.2 transition

Post by MariiaI » Fri 16 Aug 2013 08:38

We have made changes for this issue and the CreateCommand(string commandText, IDbConnection connection, bool forBatch) method will be available since the next build of LinqConnect.
We will inform you when new build of LinqConnect is available for download.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: 3.0.16 => 4.2 transition

Post by MariiaI » Tue 20 Aug 2013 06:12

The bug with missing CreateCommand method in the DataProvider class is fixed. The fix will be included in the next build of LinqConnect. We will inform you when it is available for download.

Helen
Devart Team
Posts: 127
Joined: Wed 07 Sep 2011 11:54

Re: 3.0.16 => 4.2 transition

Post by Helen » Fri 06 Sep 2013 07:36

New build of LinqConnect 4.2.327 is available for download now!

It can be downloaded from http://www.devart.com/linqconnect/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=31&t=27873 .

listonic
Posts: 39
Joined: Mon 06 Dec 2010 15:47

Re: 3.0.16 => 4.2 transition

Post by listonic » Thu 19 Sep 2013 10:57

One more question. How can you provide custom sqlcommand implementation while using POCO Entities template ?

The generated context does not seem to respect [ProviderAttribute] so i cannot provide custom SqlDataProvider.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: 3.0.16 => 4.2 transition

Post by MariiaI » Thu 19 Sep 2013 14:08

listonic wrote:The generated context does not seem to respect [ProviderAttribute] so i cannot provide custom SqlDataProvider.
'POCO entity' template generates the LinqConnect-independent (persistence-ignorant) classes. This template doesn't generate attributes, EntitySet and EntityRef for navigation properties, etc.
listonic wrote:How can you provide custom sqlcommand implementation while using POCO Entities template?
You can specify it in the mapping file - YourDataContext.xml file - which should be created when you're using "POCO Entity" template. It is necessary to specify the name of the provider, the assembly, the version if required. Make sure that the necessary assembly is available in your project.

If you have any further questions, feel free to contact us.

listonic
Posts: 39
Joined: Mon 06 Dec 2010 15:47

Re: 3.0.16 => 4.2 transition

Post by listonic » Thu 26 Sep 2013 12:14

I have one more significant problem with this new version of LinqConnect

To update entity with identity column, i used to create an object of generated class, set all fields (including identity key), then attaching the object to conetxt setting modified flag to true (Context.Attach(object, true)) and then submiting context changes.

This updated the entity.

Now all identity fields are generated as readonly and if i change it to not readonly, they are beeing included in an update statement, and obviously you cant update identity field which is a key.

How should i proceed to use the new version same way as i am used to ?

I other words, how do i update or delete entity without loading it from database first ?

Regards
Piotr

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: 3.0.16 => 4.2 transition

Post by MariiaI » Fri 27 Sep 2013 10:26

Thank you for the report. We have reproduced the issue with ignoring IsDbGenerated=true when using Attach(TEntity entity, bool asModified). We will investigate it and inform you about the results as soon as possible.

listonic
Posts: 39
Joined: Mon 06 Dec 2010 15:47

Re: 3.0.16 => 4.2 transition

Post by listonic » Fri 27 Sep 2013 10:28

Answer the question. How to update the entity without fetching it from database first.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: 3.0.16 => 4.2 transition

Post by MariiaI » Fri 27 Sep 2013 12:23

You could try performing it via the Attach(TEntity entity, TEntity original) method. For example:

Code: Select all

TestMDataContext context = new TestMDataContext() { Log = Console.Out };
TestID test_new = new TestID()
{
  Id = 1,
  Value = "new value"
};   
TestID test_original = new TestID()
{
  Id = test_new.Id
};
context.TestIDs.Attach(test_new, test_original);
context.SubmitChanges();

Please refer to http://www.devart.com/linqconnect/docs/ ... tml#modify.

listonic
Posts: 39
Joined: Mon 06 Dec 2010 15:47

Re: 3.0.16 => 4.2 transition

Post by listonic » Fri 27 Sep 2013 12:30

Ok guys, You just lost a customer.

Everytime you change a major version number of linq connect you f.. everything up.

My whole code suddenly stops working. Same was when you updated from 2.x.x to 3.x.x. I spent 3 monhts reporting bugs to you.

You mess up all interfaces and you do not perform any testing procedures.

Using Attach method with modify flag true is most basic method for me. I have no idea how could you mess it up.

Fortunatelly i have high level of abstraction in my application, which as we can see you do not want to support, and switching to for example Entity Framework is not a big deal for me.

Farewell.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: 3.0.16 => 4.2 transition

Post by MariiaI » Fri 27 Sep 2013 13:18

We are sorry that you are not satisfied with our product and will do our best to correct the situation.
We will fix this issue and inform you when the corresponding build of LinqConnect is available for download.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: 3.0.16 => 4.2 transition

Post by MariiaI » Fri 18 Oct 2013 05:12

The bug with ignoring 'IsDbGenerated = True' when using Attach(TEntity entity, bool asModified) method is fixed.
New version of LinqConnect 4.3 is available!
It can be downloaded from http://www.devart.com/linqconnect/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=31&t=28128.

Post Reply