Page 1 of 1

Can't create XmlMappingSource via FromReader method.

Posted: Thu 19 Jun 2014 10:37
by Albert
Hi,
I try to create XmlMappingSource dynamically with following code:

Code: Select all

            XNamespace ns = @"http://schemas.devart.com/linqconnect/mapping";

            XElement database = new XElement(ns + "Database",
            new XAttribute("Provider", "Devart.Data.Oracle.Linq.Provider.OracleDataProvider, Devart.Data.Oracle.Linq, Version=4.4.509.0, Culture=neutral, PublicKeyToken=09AF7300EEC23701"),
            new XAttribute("Name", string.Empty));

            var column = new XElement(ns + "Column", new XAttribute("Member", "Name"), new XAttribute("Name", "Name"));
            var type = new XElement(ns + "Type", new XAttribute("Name", "ObjType"), column);
            database.Add(new XElement(ns + "Table", new XAttribute("Name", "Obj$types"), type));


            DataContext dc = new Context(conn, Devart.Data.Linq.Mapping.XmlMappingSource.FromReader(database.CreateReader()));
And I get the following System.InvalidOperationException on last line of code:

Code: Select all

"Database node not found 'http://schemas.microsoft.com/linqtosql/mapping/2007', 'http://schemas.microsoft.com/linqtosql/dbml/2007' or 'http://schemas.devart.com/linqconnect/mapping'."}
When I create XmlMappingSource from static xml via XmlMappingSource.FromXlm method everything works fine!
Can you point me in the right direction?
Thanks!

Re: Can't create XmlMappingSource via FromReader method.

Posted: Fri 20 Jun 2014 06:48
by MariiaI
Thank you for the report on this. We have reproduced this issue. We will investigate it in more details and inform you about the results as soon as possible.
As a workaround, please use the XmlMappingSource.FromXml method.

Re: Can't create XmlMappingSource via FromReader method.

Posted: Mon 23 Jun 2014 11:34
by MariiaI
We have fixed this issue. The fix will be included in the next public build of LinqConnect, which we plan to release this week. We will post here when it is available for download.

Re: Can't create XmlMappingSource via FromReader method.

Posted: Thu 26 Jun 2014 12:20
by MariiaI
New build of LinqConnect 4.4.529 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=29870.