I copied a repository pattern sample which uses AutoFac as IOC, But in my project i use UNITY, Any idea on how to write this in Unity 3.0
AutoFac:
builder.Register<IUserRepository>(x => new UserEntityRepository (x.Resolve<IDataContextFactory<SampleDataContext>>())).SingleInstance();
Class where IOC will be injected:
public class UserEntityRepository : EntityRepository<User, SampleDataContext>, IUserRepository
{
public UserEntityRepository(IDataContextFactory<SampleDataContext> databaseFactory)
: base(databaseFactory)
{ }
}