The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,617 other followers

Archive for the ‘NHibernate’ Category

An In Depth Guide Into a Ridiculously Simple API Using .NET Core

Posted by jpluimers on 2018/11/27

Since I am going to be involved with building some REST API servers and clients in .NET, here are some links to get me up to speed.

Posted in .NET, .NET ORM, ASP.NET, C#, Development, EF Entity Framework, NHibernate, Software Development | Leave a Comment »

NHibernate, LINQ, Oracle and the placement of Take: avoid “Specified method is not supported.”

Posted by jpluimers on 2016/03/22

Even though as of 12c R1, Oracle supports a row limiting clause, NHibernate 4.2 with Oracle.DataAccess.dll 2.112.3.0 does not support that.

When you let it generate the SQL for a LINQ Take call to limit the number of results, you get an exception like this (full exception and stack trace are below):

System.NotSupportedException was unhandled by user code
  HResult=-2146233067
  Message=Specified method is not supported.

The place where you Take is important, as this does fail:
Read the rest of this entry »

Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, .NET ORM, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, C# 6 (Roslyn), Database Development, Development, NHibernate, OracleDB, Software Development | Leave a Comment »

Reminder to self: app.config and “ORA-12154: TNS:could not resolve the connect identifier specified”

Posted by jpluimers on 2016/03/17

When you have one app.config for your whole set of DTAP environments (develop/test/acceptance production), every once in a while you get this error:

ORA-12154: TNS:could not resolve the connect identifier specified

For this particular setup, it means the replacement of parameters in the app.config with actual values from the DTAP went wrong (or was missing). For that we’ve some steps in both the PreBuildEvent and PostBuildEvent of the .csproj file:

PreBuildEvent:

del "$(ProjectDir)$(TargetFileName).config"
copy "$(ProjectDir)app.config" "$(ProjectDir)$(TargetFileName).config"

PostBuildEvent:

powershell -noprofile -file Replace-Parameter.ps1 -Path "$(TargetDir)$(TargetFileName).config"

The PreBuildEvent looks like it is not needed, but sometimes Visual Studio forgets to perform the copy action.

–jeroen

Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, .NET ORM, C#, C# 2.0, C# 3.0, C# 4.0, C# 5.0, C# 6 (Roslyn), Database Development, Development, NHibernate, OracleDB, Software Development | Leave a Comment »

 
%d bloggers like this: