Hi,
Ninject looks great, so I'd like to use it in my project. Unfortunately I am still struggling to do the most trivial binding. The [Inject] attribute compiles just fine, but the compiler cannot find the "Bind" command:
using System;
using Ninject.Core;
using Ninject.Core.Binding;
namespace NinjectTest
{
public interface IFoo
{
void DoSomething();
}
public class Foo : IFoo
{
public void DoSomething()
{
throw new NotImplementedException();
}
}
public class Bar
{
[Inject] private IFoo theFoo;
public Bar()
{
Bind<IFoo>().To<Foo>(); //Compiler Error: "The name 'Bind' does not exist in the current context"
}
}
}
What could be going wrong here?