LinqConnect for Windows Phone or LinqConnect Metro?

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
BigG
Posts: 5
Joined: Sun 18 Jan 2015 18:40

LinqConnect for Windows Phone or LinqConnect Metro?

Post by BigG » Sun 18 Jan 2015 19:08

Just changing my app from Windows Phone 8.0 (Silverlight) to Windows Phone 8.1 (universal).

I have LinqConnect (Windows Phone Edition) and I copied my model from the old project to the new one and straight away I get loads of errors like this

"Error 3 The type or namespace name 'INotifyPropertyChanging' could not be found (are you missing a using directive or an assembly reference?)"

So I then deleted and tried to rebuild the model from scratch. In Visual Studio I clicked 'Add New' and then selected Data and normally I have an option for 'Devart LinqConnect Model' but it is not listed.

Just came on here to look for help and noticed there is a version called 'LinqConnect Metro'. Should I be using this version?

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

Re: LinqConnect for Windows Phone or LinqConnect Metro?

Post by MariiaI » Mon 19 Jan 2015 13:48

Please specify the full information about your Visual Studio (e.g., via Help-> About Microsoft Visual Studio menu).
Please make sure you have added the "Devart LinqConnect for Windows Phone 8.1 (...)" Extension SDK to the References of the Windows Phone 8.1 project. If not, please add it and tell us if this helps.
In Visual Studio I clicked 'Add New' and then selected Data and normally I have an option for 'Devart LinqConnect Model' but it is not listed.
We will investigate this issue and inform you about the results as soon as possible.

BigG
Posts: 5
Joined: Sun 18 Jan 2015 18:40

Re: LinqConnect for Windows Phone or LinqConnect Metro?

Post by BigG » Mon 19 Jan 2015 13:54

Visual Studio Professional 2013 - Version Number 12.0.311.01.00 Update 4

Yes I have double checked that Devart LinqConnect for Windows Phone 8.1 is there.

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

Re: LinqConnect for Windows Phone or LinqConnect Metro?

Post by MariiaI » Tue 20 Jan 2015 10:16

Thank you for the response.
We are investigating the issue. We will inform you about the results as soon as possible.

BigG
Posts: 5
Joined: Sun 18 Jan 2015 18:40

Re: LinqConnect for Windows Phone or LinqConnect Metro?

Post by BigG » Tue 20 Jan 2015 21:51

After further investigation it would seem that INotifyPropertyChanging is no longer used in Windows Phone 8.1 Universal/store apps.

Can you provide a fix for this? I would imagine LinqConnect Metro gets around this issue.

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

Re: LinqConnect for Windows Phone or LinqConnect Metro?

Post by MariiaI » Wed 21 Jan 2015 12:45

Can you provide a fix for this? I would imagine LinqConnect Metro gets around this issue.
We are working on the issue at the moment. We will contact you as soon as possible.

Possible workarounds:
In Visual Studio I clicked 'Add New' and then selected Data and normally I have an option for 'Devart LinqConnect Model' but it is not listed.
You can create new Devart LinqConnect model in standalone Entity Developer, generate code for it and add the generated code files to your Visual Studio project.
"Error 3 The type or namespace name 'INotifyPropertyChanging' could not be found (are you missing a using directive or an assembly reference?)"
You could try using POCO classes. The 'POCO Entity' template was improved in LinqConnect 4.2.247: new template setting, "Property Change Notifiers", was added. You can set it to False and in this case, INotifyPropertyChanging and INotifyPropertyChanged interfaces will not be generated.

BigG
Posts: 5
Joined: Sun 18 Jan 2015 18:40

Re: LinqConnect for Windows Phone or LinqConnect Metro?

Post by BigG » Wed 21 Jan 2015 12:54

You could try using POCO classes. The 'POCO Entity' template was improved in LinqConnect 4.2.247: new template setting, "Property Change Notifiers", was added. You can set it to False and in this case, INotifyPropertyChanging and INotifyPropertyChanged interfaces will not be generated.
Where can I find this template? I can only see the one template when using the entity developer.

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

Re: LinqConnect for Windows Phone or LinqConnect Metro?

Post by MariiaI » Wed 21 Jan 2015 13:10

Perform the following steps:
- open the model (*.lqml file) and expand the "Templates" node in Model Explorer;
- select "New Template" from the shortcut menu of the "Templates" node in Model Explorer and then select the "POCO Entity" template;
- open properties for the "POCO Entity" template and set the "Property Change Notifier" property to False;
- right-click the "LinqConnect" template and select Disable.
- save changes and generate the code for model.

Please refer to the corresponding section in the Entity Developer documentation:
- Template System Concepts
- ORM Support -> LinqConnect -> Concepts Model -> Generation Templates
JIC: Entity Developer documentation is available with the installation package (the "Help" component should have been selected when installing).

Please tell us if this helps.

BigG
Posts: 5
Joined: Sun 18 Jan 2015 18:40

Re: LinqConnect for Windows Phone or LinqConnect Metro?

Post by BigG » Wed 21 Jan 2015 19:54

Just tried using POCO and at the following code I get a new error

Code: Select all

            static DefaultXmlMappingProvider()
            {
                defaultSource = XmlMappingSource.FromResource(@"DataContext1.xml");
            }
Error
'Devart.Data.Linq.Mapping.XmlMappingSource' does not contain a definition for 'FromResource'

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

Re: LinqConnect for Windows Phone or LinqConnect Metro?

Post by MariiaI » Wed 28 Jan 2015 06:27

Sorry for the delay.
We have contacted you by e-mail.

Post Reply