IocConfig
From Logic Wiki
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Microsoft.AspNet.Identity;
using Microsoft.Owin.Security;
using MyAccount.Application.Models.Authentication;
using MyAccount.Ioc.Registries;
using MyAccount.Web.Models;
using StructureMap;
namespace MyAccount.Web.App_Start
{
}
public class IocConfig
{
public static IContainer Setup()
{
var container = new Container(
x =>
{
//x.For<IUserStore<ApplicationUser>>().Use<UserStore<ApplicationUser>>();
x.For<IAuthenticationManager>().Use(() => HttpContext.Current.GetOwinContext().Authentication);
x.AddRegistry<ApplicationRegistry>();
x.Scan(y =>
{
y.WithDefaultConventions();
y.LookForRegistries();
});
}
);
return container;
}
}