ServiceStack "referenced in method implementation may not be final method"

Trying to configure ServiceStack

on OrmLite

to connect to my local instance SQL

. Getting error

"The declaration mentioned in the implementation of the method may not be the final Method"

and it makes me shit. Here are my steps:

  • New Project "ServiceStack ASP.NET Empty"
  • ServiceStack.OrmLite.SqlServer NuGet package installed in the Service project
  • Added the following code to the Configure section of AppHost:

public override void Configure(Funq.Container container) { var connectionString = ConfigurationManager.ConnectionStrings["ApiDbConnectionString"].ConnectionString; container.Register<IDbConnectionFactory>(c => new OrmLiteConnectionFactory(connectionString, SqlServerDialect.Provider)); OrmLiteConnectionFactory dbFactory = new OrmLiteConnectionFactory(connectionString, SqlServerDialect.Provider);

    }

Here are my operators:

using System;
using System.IO;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
using ServiceStack;
using ServiceStack.Data;
using ServiceStack.OrmLite;
using ServiceStack.OrmLite.SqlServer;
using LRIService.ServiceInterface;

      

I would like to use this database connection throughout my application for caching, data access and ultimately user authentication.

Finally, are there any good examples ServiceStack

running as standalone services (rather than as part of an application ASP.NET MVC

)? I'm going to access this through a standalone AngularJS app that may or may not be hosted on the same domain (I've worked with a function previously CORS

). I am just having trouble separating stuff ASP.NET MVC

from stuff ServiceStack

in many examples on the web.

Thanks for any help ...

+3


source to share


1 answer


Your error message sounds like you are mixing different ServiceStack versions together. Try clearing your NuGet package cache . Alternatively, you can try the most recent v4.0.34 packages at MyGet .

As far as non-ASP.NET MVC examples go , most ServiceStack Live Demos are Single Pages Apps that don't Use ASP.NET MVC at all:



+1


source







All Articles