I'm attempting to convert some old WCF web services to using ServiceStack and add some more functionality.
I need to connect to Oracle and use EntityFramework for the data access.
I've tried using the Oracle managed drivers with the ServiceStack.OrmLite.Oracle.Managed package and keep getting errors.
I took this demo: http://www.dotnetcurry.com/aspnet/1056/introducing-service-stack-tutorial
and modified it to use Oracle and having all kinds of issues.
Can anyone point me to some info on how to do this?
I modified the ormListConnectionFactory to this:
var ormLiteConnectionFactory = new OrmLiteConnectionFactory(ConfigurationManager.ConnectionStrings["Oracle"].ConnectionString,
OracleOrmLiteDialectProvider.Instance);
And getting these 2 errors:
The type 'OrmLiteDialectProviderBase<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'ServiceStack.OrmLite, Version=4.0.0.0, Culture=neutral, PublicKeyToken=e06fbc6124f57c43'.
cannot convert from 'ServiceStack.OrmLite.Oracle.OracleOrmLiteDialectProvider' to 'ServiceStack.OrmLite.IOrmLiteDialectProvider'
Is there a way to not use the OrmLite and just use EF6, instead?
The NuGet package for using OrmLite and Oracle is ServiceStack.OrmLite.Oracle. But if you don't want to use OrmLite, don't reference any OrmLite NuGet package or use its OrmLiteConnectionFactory
class.
ServiceStack itself doesn't require any dependency to OrmLite, the error message you're getting is likely due to trying to mix and match using old 3rd Party NuGet package ServiceStack.OrmLite.Oracle.Managed
which stops at version v4.0.33 together with ServiceStack packages of a different version which you can't do - all ServiceStack NuGet packages should be the same version.
ServiceStack doesn't prohibit usage of EF6 - you should be able to use EF6 in the same way as you would any other .NET Project.