采用全新的数据库架构

This commit is contained in:
yubaolee
2015-10-26 21:58:12 +08:00
parent 366d3a5351
commit 13d44f28b6
91 changed files with 21208 additions and 9430 deletions

View File

@@ -8,6 +8,7 @@ using System.Web.Optimization;
using System.Web.Routing;
using Autofac;
using Autofac.Integration.Mvc;
using Infrastructure;
using OpenAuth.App;
using OpenAuth.Domain.Interface;
using OpenAuth.Repository;
@@ -18,41 +19,15 @@ namespace OpenAuth.Mvc
{
protected void Application_Start()
{
InitAutofac();
AutofacExt.InitAutofac();
AreaRegistration.RegisterAllAreas();
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
}
private static void InitAutofac()
{
var builder = new ContainerBuilder();
builder.RegisterType<UserRepository>().As<IUserRepository>();
builder.RegisterType<LoginApp>();
// Register your MVC controllers.
builder.RegisterControllers(typeof (MvcApplication).Assembly);
// OPTIONAL: Register model binders that require DI.
builder.RegisterModelBinders(Assembly.GetExecutingAssembly());
builder.RegisterModelBinderProvider();
// OPTIONAL: Register web abstractions like HttpContextBase.
builder.RegisterModule<AutofacWebTypesModule>();
// OPTIONAL: Enable property injection in view pages.
builder.RegisterSource(new ViewRegistrationSource());
// OPTIONAL: Enable property injection into action filters.
builder.RegisterFilterProvider();
// Set the dependency resolver to be Autofac.
var container = builder.Build();
DependencyResolver.SetResolver(new AutofacDependencyResolver(container));
LogHelper.Log("启动Web");
}
}
}