Hi,
I have been evaluating LinqConnect for Metro as a local storage solution for our Windows Store App. Unfortunately for us the SQLite provider only appears to support xaml apps wheras our application in a hybrid WinJS / c# WinRT component app.
When constructing a DataContext from a WinRT component the following exception is thrown
System.Exception occurred
HResult=-2147418113
Message=Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
Source=Windows.UI.Xaml
StackTrace:
at Windows.UI.Xaml.Application.get_Current()
at Devart.Data.SQLite.Linq.Provider.SQLiteDataProvider.Initialize(Object connection)
at Devart.Data.Linq.DataProvider.7axdkwt3gfx52xqzykge2d4jpayt4hd5 (IDataServices , Object )
at Devart.Data.Linq.DataContext. (Object , MappingSource , Type )
at Devart.Data.Linq.DataContext..ctor(String connectionString, MappingSource mapping)
at ClassLibrary1.OfflineDataContext..ctor(String persisterConfigData) in c:\Users\xxx\Documents\Visual Studio 2012\Projects\App20\ClassLibrary1\OfflineDataContext.cs:line 29
The property Windows.UI.Xaml.Application.Current is not supported in WinJS apps.
Is there any workaround (e.g. an alternative SQLite provider) or do you have plans to support WinJS in the future?
Thanks,
David
LinqConnect for Metro - WinJS support
Re: LinqConnect for Metro - WinJS support
At the moment, LinqConnect for Metro can be used in XAML C# and Visual Basic applications only.
We will consider adding the WinJS support in the future. We will inform you about the results as soon as any are available.
We will consider adding the WinJS support in the future. We will inform you about the results as soon as any are available.
Re: LinqConnect for Metro - WinJS support
Thanks for the reply. I have found an ugly workaround that suggests it wouldn't need a big change. Although this seems to work I'm still a bit uneasy about using this in production code and hence recommending purchasing licences for the development team.MariiaI wrote:At the moment, LinqConnect for Metro can be used in XAML C# and Visual Basic applications only.
We will consider adding the WinJS support in the future. We will inform you about the results as soon as any are available.
public class NewProvider : SQLiteDataProvider
{
private const int CatastrophicError = -2147418113;
protected override void Initialize(object connection)
{
try
{
base.Initialize(connection);
}
catch (Exception ex)
{
if (ex.HResult != CatastrophicError)
throw;
}
}
}
Re: LinqConnect for Metro - WinJS support
We have fixed the issue with the WinJS applications and LinqConnect for Metro. The fix will be included in the next build of LinqConnect for Metro. We will inform you when it is available for download.
Re: LinqConnect for Metro - WinJS support
Thanks for the speedy response. We will now be placing an order.MariiaI wrote:We have fixed the issue with the WinJS applications and LinqConnect for Metro. The fix will be included in the next build of LinqConnect for Metro. We will inform you when it is available for download.
Re: LinqConnect for Metro - WinJS support
New version of LinqConnect for Metro 4.3 is released!
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.
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.