Gianluca Ghettini
Gianluca Ghettini

Reputation: 11668

NEST 2.0 ElasticSearch2 and .NET C# WebAPI

I have a .NET WebAPI and I recently moved to NEST2 and ElasticSearch2.

Before porting the code I had:

        new InjectionConstructor(
            new ResolvedParameter<IConnectionSettingsValues>(),
            new OptionalParameter<IConnection>(),
            new OptionalParameter<INestSerializer>(),
            new OptionalParameter<ITransport>()));

to inject NEST into my WebAPI

Unfortunately the namespace

using Elasticsearch.Net.Connection;

doesn't exist anymore and I get three errors about IConnection INestSerializer ITransport not being found

How can I fix that?

Upvotes: 0

Views: 227

Answers (1)

Russ Cam
Russ Cam

Reputation: 125538

In Nest 2.x, namespaces have been simplified to put

  • all types in assembly Elasticsearch.Net in namespace Elasticsearch.Net
  • all types in assembly Nest in namespace Nest

Upvotes: 1

Related Questions