Thanks for the head up. It really seems to be related to the SQLClient and 
the function called in the GetReservedWords method in the 
MsSqlDataBaseSchema-class of NHibernate.
When creating a derived class and override this method (and of course use 
it in a custom MsSql-Dialect class) we can use Azure SQL Edge without a 
problem.

Like this:

https://pastebin.com/M09caRN0

You can use the dialect like this in your NHibernate configuration:

c.DataBaseIntegration(db => db.Dialect<EnhancedMsSql2008Dialect>());

while c is your NHibernate-Configuration object.

Note: you can also derive from MsSql2012Dialect - in our use case we have a 
specific need not to do it ;)

cwac...@gmail.com schrieb am Donnerstag, 25. November 2021 um 23:03:51 
UTC+1:

> Some people on our team are attempting the same thing - and running into 
> the same issue. 
> The trouble is with underlying SQLClient that's issuing query using clr 
> dependent function ASSEMBLYPROPERTY which is not supported in SQL Edge. 
>
>
> https://github.com/dotnet/SqlClient/blob/main/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlMetadataFactory.cs
> It seems like there would be a technically equivalent way to perform this 
> query without the function. 
> Would be nice if the provider library was able to operate in an ANSI sql 
> compatible manner if desired. 
>
> This issue is related to this gentlemen's post as well. 
> https://github.com/nhibernate/nhibernate-core/issues/2087
>
>
> On Monday, November 22, 2021 at 9:55:23 AM UTC-5 sandro...@gmail.com 
> wrote:
>
>> Hello,
>>
>> When we try to use Azure SQL Edge instead of MSSQL Server with NHibernate 
>> we always get:
>>
>> SqlException: Common Language Runtime(CLR) is not enabled on this 
>> instance.
>>
>> Why does NHibernate need CLR support and how to disable it? Azure SQL 
>> Edge does not support CLR and never will.
>>
>> We just don't see why NHibernate would need it as it supports so many 
>> different databases and CRL is a very minor feature for SQL Server.
>>
>> Any ideas?
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nhusers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nhusers/77061dda-f1e7-4c5b-a2a9-8098f86d0c87n%40googlegroups.com.

Reply via email to