diff --git a/Infrastructure/Helper/CookieHelper.cs b/Infrastructure/Helper/CookieHelper.cs
new file mode 100644
index 00000000..d636042d
--- /dev/null
+++ b/Infrastructure/Helper/CookieHelper.cs
@@ -0,0 +1,72 @@
+// ***********************************************************************
+// Assembly : Infrastructure
+// Author : Administrator
+// Created : 09-22-2015
+//
+// ***********************************************************************
+//
+// Copyright (c) . All rights reserved.
+//
+// Cookie辅助
+// ***********************************************************************
+
+using System;
+using System.Web;
+
+namespace Infrastructure.Helper
+{
+ ///
+ /// Cookie帮助类
+ ///
+ public class CookieHelper
+ {
+ ///
+ /// 写cookie值
+ ///
+ /// 名称
+ /// 值
+ public static void WriteCookie(string strName, string strValue)
+ {
+ HttpCookie cookie = HttpContext.Current.Request.Cookies[strName];
+ if (cookie == null)
+ {
+ cookie = new HttpCookie(strName);
+ }
+ cookie.Value = strValue;
+ HttpContext.Current.Response.AppendCookie(cookie);
+
+ }
+ ///
+ /// 写cookie值
+ ///
+ /// 名称
+ /// 值
+ /// 过期时间(分钟)
+ public static void WriteCookie(string strName, string strValue, int expires)
+ {
+ HttpCookie cookie = HttpContext.Current.Request.Cookies[strName];
+ if (cookie == null)
+ {
+ cookie = new HttpCookie(strName);
+ }
+ cookie.Value = strValue;
+ cookie.Expires = DateTime.Now.AddMinutes(expires);
+ HttpContext.Current.Response.AppendCookie(cookie);
+
+ }
+
+ ///
+ /// 读cookie值
+ ///
+ /// 名称
+ /// cookie值
+ public static string GetCookie(string strName)
+ {
+ if (HttpContext.Current.Request.Cookies[strName] != null)
+ {
+ return HttpContext.Current.Request.Cookies[strName].Value.ToString();
+ }
+ return "";
+ }
+ }
+}
diff --git a/Infrastructure/Infrastructure.csproj b/Infrastructure/Infrastructure.csproj
new file mode 100644
index 00000000..ee06a4d5
--- /dev/null
+++ b/Infrastructure/Infrastructure.csproj
@@ -0,0 +1,55 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {5FEAEC9A-4F1E-4EE7-B377-9DB1B0870DAC}
+ Library
+ Properties
+ Infrastructure
+ Infrastructure
+ v4.5
+ 512
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Infrastructure/Properties/AssemblyInfo.cs b/Infrastructure/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..f374835c
--- /dev/null
+++ b/Infrastructure/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 有关程序集的常规信息通过以下
+// 特性集控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("Infrastructure")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Infrastructure")]
+[assembly: AssemblyCopyright("Copyright © 2015")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 将 ComVisible 设置为 false 使此程序集中的类型
+// 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
+// 则将该类型上的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
+[assembly: Guid("e953a7ce-9f0c-4aec-973c-de31e38e10e6")]
+
+// 程序集的版本信息由下面四个值组成:
+//
+// 主版本
+// 次版本
+// 生成号
+// 修订号
+//
+// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
+// 方法是按如下所示使用“*”:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenAuth.App/LoginApp.cs b/OpenAuth.App/LoginApp.cs
index 430720c6..46c11ae3 100644
--- a/OpenAuth.App/LoginApp.cs
+++ b/OpenAuth.App/LoginApp.cs
@@ -1,29 +1,28 @@
-using System;
-using OpenAuth.Domain.Interface;
-
-namespace OpenAuth.App
-{
- public class LoginApp
- {
- private IUserRepository _repository;
-
- public LoginApp(IUserRepository repository)
- {
- _repository = repository;
- }
-
- public void Login(string userName, string password)
- {
- var user = _repository.FindByAccount(userName);
- if (user == null)
- {
- throw new Exception("ûʺŲ");
- }
-
- user.CheckLogin(password);
-
- LoginCacheApp.SetLogin(user);
-
- }
- }
+using System;
+using OpenAuth.Domain.Interface;
+
+namespace OpenAuth.App
+{
+ public class LoginApp
+ {
+ private IUserRepository _repository;
+
+ public LoginApp(IUserRepository repository)
+ {
+ _repository = repository;
+ }
+
+ public void Login(string userName, string password)
+ {
+ var user = _repository.FindByAccount(userName);
+ if (user == null)
+ {
+ throw new Exception("ûʺŲ");
+ }
+
+ user.CheckLogin(password);
+
+
+ }
+ }
}
\ No newline at end of file
diff --git a/OpenAuth.App/LoginCacheApp.cs b/OpenAuth.App/LoginCacheApp.cs
deleted file mode 100644
index 27b2e1ed..00000000
--- a/OpenAuth.App/LoginCacheApp.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using System.Web;
-using OpenAuth.Domain;
-
-namespace OpenAuth.App
-{
- public class LoginCacheApp
- {
- public static User GetLogin()
- {
- var session = HttpContext.Current.Session;
- return session["Login"] as User;
- }
-
- public static void SetLogin(User loginresp)
- {
- var session = HttpContext.Current.Session;
- var login = session["Login"] as User;
- if (login != null && login.UserId == loginresp.UserId)
- {
- return;
- }
- session["Login"] = loginresp;
- }
- }
-}
diff --git a/OpenAuth.App/OpenAuth.App.csproj b/OpenAuth.App/OpenAuth.App.csproj
index 15cc42b8..bad2816b 100644
--- a/OpenAuth.App/OpenAuth.App.csproj
+++ b/OpenAuth.App/OpenAuth.App.csproj
@@ -1,65 +1,64 @@
-
-
-
-
- Debug
- AnyCPU
- {0BBF2D65-FFFD-4272-B138-8EA4FB6FEC48}
- Library
- Properties
- OpenAuth.App
- OpenAuth.App
- v4.0
- 512
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {6108da8e-92a1-4abe-b9f5-26d64d55ca2c}
- OpenAuth.Domain
-
-
- {e8df8dea-e2cf-4bdb-8f4f-3f8205b0e03a}
- OpenAuth.Repository
-
-
-
-
+
+
+
+
+ Debug
+ AnyCPU
+ {0BBF2D65-FFFD-4272-B138-8EA4FB6FEC48}
+ Library
+ Properties
+ OpenAuth.App
+ OpenAuth.App
+ v4.0
+ 512
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {6108da8e-92a1-4abe-b9f5-26d64d55ca2c}
+ OpenAuth.Domain
+
+
+ {e8df8dea-e2cf-4bdb-8f4f-3f8205b0e03a}
+ OpenAuth.Repository
+
+
+
+
\ No newline at end of file
diff --git a/OpenAuth.Mvc/App_Start/Startup.Auth.cs b/OpenAuth.Mvc/App_Start/Startup.Auth.cs
deleted file mode 100644
index 70abe789..00000000
--- a/OpenAuth.Mvc/App_Start/Startup.Auth.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using Microsoft.AspNet.Identity;
-using Microsoft.Owin;
-using Microsoft.Owin.Security.Cookies;
-using Owin;
-
-namespace OpenAuth.Mvc
-{
- public partial class Startup
- {
- // 有关配置身份验证的详细信息,请访问 http://go.microsoft.com/fwlink/?LinkId=301864
- public void ConfigureAuth(IAppBuilder app)
- {
- // 使应用程序可以使用 Cookie 来存储已登录用户的信息
- app.UseCookieAuthentication(new CookieAuthenticationOptions
- {
- AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
- LoginPath = new PathString("/Account/Login")
- });
- // Use a cookie to temporarily store information about a user logging in with a third party login provider
- app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);
-
- // 取消注释以下行可允许使用第三方登录提供程序登录
- //app.UseMicrosoftAccountAuthentication(
- // clientId: "",
- // clientSecret: "");
-
- //app.UseTwitterAuthentication(
- // consumerKey: "",
- // consumerSecret: "");
-
- //app.UseFacebookAuthentication(
- // appId: "",
- // appSecret: "");
-
- //app.UseGoogleAuthentication();
- }
- }
-}
\ No newline at end of file
diff --git a/OpenAuth.Mvc/Controllers/AccountController.cs b/OpenAuth.Mvc/Controllers/AccountController.cs
index acc2cfca..570fc246 100644
--- a/OpenAuth.Mvc/Controllers/AccountController.cs
+++ b/OpenAuth.Mvc/Controllers/AccountController.cs
@@ -1,122 +1,95 @@
-using Microsoft.AspNet.Identity;
-using Microsoft.Owin.Security;
-using OpenAuth.Mvc.Models;
-using System.Collections.Generic;
-using System.Security.Claims;
-using System.Threading.Tasks;
-using System.Web;
-using System.Web.Mvc;
-using Newtonsoft.Json;
-using OpenAuth.App;
-using OpenAuth.Domain;
-using OpenAuth.Domain.Interface;
-
-namespace OpenAuth.Mvc.Controllers
-{
- [Authorize]
- public class AccountController : Controller
- {
- private IUserRepository _userRepository;
-
- public AccountController(IUserRepository repository)
- {
- _userRepository = repository;
- }
- //
- // GET: /Account/Login
- [AllowAnonymous]
- public ActionResult Login(string returnUrl)
- {
- ViewBag.ReturnUrl = returnUrl;
- return View();
- }
-
- //
- // POST: /Account/Login
- [HttpPost]
- [AllowAnonymous]
- [ValidateAntiForgeryToken]
- public async Task Login(LoginViewModel model, string returnUrl)
- {
- if (ModelState.IsValid)
- {
- //直接生成登陆用户,在实际的项目中采用数据库形式
- var user = new User {Account = "admin"};
- if (user != null)
- {
- await SignInAsync(user, model.RememberMe);
- return RedirectToLocal(returnUrl);
- }
- else
- {
- ModelState.AddModelError("", "Invalid username or password.");
- }
- }
-
- // 如果我们进行到这一步时某个地方出错,则重新显示表单
- return View(model);
- }
-
- //
- // POST: /Account/LogOff
- public ActionResult LogOff()
- {
- AuthenticationManager.SignOut();
- return RedirectToAction("Login", "Account");
- }
-
- public ActionResult List()
- {
- return View();
- }
- public string LoadUsers()
- {
- return JsonConvert.SerializeObject(_userRepository.LoadUsers());
- }
-
- #region 帮助程序
-
- private IAuthenticationManager AuthenticationManager
- {
- get
- {
- return HttpContext.GetOwinContext().Authentication;
- }
- }
-
- ///
- /// sign information as an asynchronous operation.
- ///
- /// 用户
- /// Remember me?
- /// Task.
- private async Task SignInAsync(User user, bool isPersistent)
- {
- AuthenticationManager.SignOut(DefaultAuthenticationTypes.ExternalCookie);
- var claims = new List
- {
- new Claim(ClaimTypes.Name, user.Account),
- new Claim(ClaimTypes.Role, "Administrator"),
- new Claim(ClaimTypes.NameIdentifier, "7c301fe4-099e-46f9-bdb8-e922d73a8031"),
- new Claim("http://schemas.microsoft.com/accesscontrolservice/2010/07/claims/identityprovider",
- "ASP.NET Identity")
- };
- var identity = new ClaimsIdentity(claims, DefaultAuthenticationTypes.ApplicationCookie);
- AuthenticationManager.SignIn(new AuthenticationProperties() { IsPersistent = isPersistent }, identity);
- }
-
- private ActionResult RedirectToLocal(string returnUrl)
- {
- if (Url.IsLocalUrl(returnUrl))
- {
- return Redirect(returnUrl);
- }
- else
- {
- return RedirectToAction("Index", "Home");
- }
- }
-
- #endregion 帮助程序
- }
+using Microsoft.AspNet.Identity;
+using Microsoft.Owin.Security;
+using OpenAuth.Mvc.Models;
+using System.Collections.Generic;
+using System.Security.Claims;
+using System.Threading.Tasks;
+using System.Web;
+using System.Web.Mvc;
+using Infrastructure.Helper;
+using Newtonsoft.Json;
+using OpenAuth.App;
+using OpenAuth.Domain;
+using OpenAuth.Domain.Interface;
+
+namespace OpenAuth.Mvc.Controllers
+{
+ [Authorize]
+ public class AccountController : Controller
+ {
+ private LoginApp _loginApp;
+ private IUserRepository _userRepository;
+
+ public AccountController(IUserRepository repository)
+ {
+ _userRepository = repository;
+ _loginApp = new LoginApp(_userRepository);
+ }
+ //
+ // GET: /Account/Login
+ [AllowAnonymous]
+ public ActionResult Login(string returnUrl)
+ {
+ ViewBag.ReturnUrl = returnUrl;
+ return View();
+ }
+
+ //
+ // POST: /Account/Login
+ [HttpPost]
+ [AllowAnonymous]
+ [ValidateAntiForgeryToken]
+ public async Task Login(LoginViewModel model, string returnUrl)
+ {
+ if (ModelState.IsValid)
+ {
+ //直接生成登陆用户,在实际的项目中采用数据库形式
+ var user = new User {Account = "admin"};
+ if (user != null)
+ {
+
+ return RedirectToLocal(returnUrl);
+ }
+ else
+ {
+ ModelState.AddModelError("", "Invalid username or password.");
+ }
+ }
+
+ // 如果我们进行到这一步时某个地方出错,则重新显示表单
+ return View(model);
+ }
+
+ //
+ // POST: /Account/LogOff
+ public ActionResult LogOff()
+ {
+ SessionHelper.Clear();
+ return RedirectToAction("Login", "Account");
+ }
+
+ public ActionResult List()
+ {
+ return View();
+ }
+ public string LoadUsers()
+ {
+ return JsonConvert.SerializeObject(_userRepository.LoadUsers());
+ }
+
+
+
+ private ActionResult RedirectToLocal(string returnUrl)
+ {
+ if (Url.IsLocalUrl(returnUrl))
+ {
+ return Redirect(returnUrl);
+ }
+ else
+ {
+ return RedirectToAction("Index", "Home");
+ }
+ }
+
+ }
}
\ No newline at end of file
diff --git a/OpenAuth.Mvc/Controllers/BaseController.cs b/OpenAuth.Mvc/Controllers/BaseController.cs
new file mode 100644
index 00000000..06c4a6bf
--- /dev/null
+++ b/OpenAuth.Mvc/Controllers/BaseController.cs
@@ -0,0 +1,35 @@
+// ***********************************************************************
+// Assembly : OpenAuth.Mvc
+// Author : Administrator
+// Created : 09-22-2015
+//
+// Last Modified By : Administrator
+// Last Modified On : 09-22-2015
+// ***********************************************************************
+//
+// Copyright (c) . All rights reserved.
+//
+// 基础控制器,设置权限
+// ***********************************************************************
+
+using System.Web.Mvc;
+using Infrastructure.Helper;
+using OpenAuth.Domain;
+
+namespace OpenAuth.Mvc.Controllers
+{
+ public class BaseController : Controller
+ {
+ protected override void OnActionExecuting(ActionExecutingContext filterContext)
+ {
+ base.OnActionExecuting(filterContext);
+
+ #region 当Session过期自动跳出登录画面
+ if (SessionHelper.GetSessionUser() == null)
+ {
+ Response.Redirect("~/Account/Login");
+ }
+ #endregion
+ }
+ }
+}
\ No newline at end of file
diff --git a/OpenAuth.Mvc/Controllers/HomeController.cs b/OpenAuth.Mvc/Controllers/HomeController.cs
index 8819e721..ec463a95 100644
--- a/OpenAuth.Mvc/Controllers/HomeController.cs
+++ b/OpenAuth.Mvc/Controllers/HomeController.cs
@@ -1,17 +1,17 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using System.Web.Mvc;
-
-namespace OpenAuth.Mvc.Controllers
-{
- public class HomeController : Controller
- {
- public ActionResult Index()
- {
- return View();
- }
-
- }
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.Mvc;
+
+namespace OpenAuth.Mvc.Controllers
+{
+ public class HomeController : BaseController
+ {
+ public ActionResult Index()
+ {
+ return View();
+ }
+
+ }
}
\ No newline at end of file
diff --git a/OpenAuth.Mvc/OpenAuth.Mvc.csproj b/OpenAuth.Mvc/OpenAuth.Mvc.csproj
index 6170ac2c..9942f133 100644
--- a/OpenAuth.Mvc/OpenAuth.Mvc.csproj
+++ b/OpenAuth.Mvc/OpenAuth.Mvc.csproj
@@ -1,327 +1,331 @@
-
-
-
-
- Debug
- AnyCPU
-
-
- 2.0
- {2A9D9687-1822-41CF-B7DF-819BFC0F8FE9}
- {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
- Library
- Properties
- OpenAuth.Mvc
- OpenAuth.Mvc
- v4.5
- false
- true
-
-
-
-
-
-
- true
- full
- false
- bin\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\
- TRACE
- prompt
- 4
-
-
-
- ..\packages\Autofac.3.5.2\lib\net40\Autofac.dll
-
-
- ..\packages\Autofac.Mvc5.3.3.4\lib\net45\Autofac.Integration.Mvc.dll
-
-
-
- False
- ..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll
-
-
-
-
-
-
-
-
-
-
-
- False
- ..\packages\Microsoft.AspNet.WebPages.3.1.2\lib\net45\System.Web.Helpers.dll
-
-
- True
- ..\packages\Microsoft.AspNet.Mvc.5.1.3\lib\net45\System.Web.Mvc.dll
-
-
- False
- ..\packages\Microsoft.AspNet.Razor.3.1.2\lib\net45\System.Web.Razor.dll
-
-
- False
- ..\packages\Microsoft.AspNet.WebPages.3.1.2\lib\net45\System.Web.WebPages.dll
-
-
- False
- ..\packages\Microsoft.AspNet.WebPages.3.1.2\lib\net45\System.Web.WebPages.Deployment.dll
-
-
- False
- ..\packages\Microsoft.AspNet.WebPages.3.1.2\lib\net45\System.Web.WebPages.Razor.dll
-
-
-
-
-
-
-
-
-
-
-
- True
- ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll
-
-
-
-
-
-
- ..\packages\Microsoft.AspNet.Web.Optimization.1.1.1\lib\net40\System.Web.Optimization.dll
-
-
- True
- ..\packages\WebGrease.1.5.2\lib\WebGrease.dll
-
-
- True
- ..\packages\Antlr.3.4.1.9004\lib\Antlr3.Runtime.dll
-
-
-
-
- ..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.dll
-
-
- ..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll
-
-
- ..\packages\Microsoft.AspNet.Identity.Core.1.0.0\lib\net45\Microsoft.AspNet.Identity.Core.dll
-
-
- ..\packages\Microsoft.AspNet.Identity.Owin.1.0.0\lib\net45\Microsoft.AspNet.Identity.Owin.dll
-
-
- ..\packages\Microsoft.AspNet.Identity.EntityFramework.1.0.0\lib\net45\Microsoft.AspNet.Identity.EntityFramework.dll
-
-
- ..\packages\Owin.1.0\lib\net40\Owin.dll
-
-
- ..\packages\Microsoft.Owin.2.0.0\lib\net45\Microsoft.Owin.dll
-
-
- ..\packages\Microsoft.Owin.Host.SystemWeb.2.0.0\lib\net45\Microsoft.Owin.Host.SystemWeb.dll
-
-
- ..\packages\Microsoft.Owin.Security.2.0.0\lib\net45\Microsoft.Owin.Security.dll
-
-
- ..\packages\Microsoft.Owin.Security.Facebook.2.0.0\lib\net45\Microsoft.Owin.Security.Facebook.dll
-
-
- ..\packages\Microsoft.Owin.Security.Cookies.2.0.0\lib\net45\Microsoft.Owin.Security.Cookies.dll
-
-
- ..\packages\Microsoft.Owin.Security.OAuth.2.0.0\lib\net45\Microsoft.Owin.Security.OAuth.dll
-
-
- ..\packages\Microsoft.Owin.Security.Google.2.0.0\lib\net45\Microsoft.Owin.Security.Google.dll
-
-
- ..\packages\Microsoft.Owin.Security.Twitter.2.0.0\lib\net45\Microsoft.Owin.Security.Twitter.dll
-
-
- ..\packages\Microsoft.Owin.Security.MicrosoftAccount.2.0.0\lib\net45\Microsoft.Owin.Security.MicrosoftAccount.dll
-
-
-
-
-
-
-
-
-
-
- Global.asax
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Web.config
-
-
- Web.config
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {0bbf2d65-fffd-4272-b138-8ea4fb6fec48}
- OpenAuth.App
-
-
- {6108da8e-92a1-4abe-b9f5-26d64d55ca2c}
- OpenAuth.Domain
-
-
- {e8df8dea-e2cf-4bdb-8f4f-3f8205b0e03a}
- OpenAuth.Repository
-
-
-
- 10.0
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
-
-
-
-
-
-
-
-
-
-
-
- True
- True
- 56813
- /
- http://localhost:56813/
- False
- False
-
-
- False
-
-
-
-
-
+
+
+
+
+ Debug
+ AnyCPU
+
+
+ 2.0
+ {2A9D9687-1822-41CF-B7DF-819BFC0F8FE9}
+ {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
+ Library
+ Properties
+ OpenAuth.Mvc
+ OpenAuth.Mvc
+ v4.5
+ false
+ true
+
+
+
+
+
+
+ true
+ full
+ false
+ bin\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\
+ TRACE
+ prompt
+ 4
+
+
+
+ ..\packages\Autofac.3.5.2\lib\net40\Autofac.dll
+
+
+ ..\packages\Autofac.Mvc5.3.3.4\lib\net45\Autofac.Integration.Mvc.dll
+
+
+
+ False
+ ..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll
+
+
+
+
+
+
+
+
+
+
+
+ False
+ ..\packages\Microsoft.AspNet.WebPages.3.1.2\lib\net45\System.Web.Helpers.dll
+
+
+ True
+ ..\packages\Microsoft.AspNet.Mvc.5.1.3\lib\net45\System.Web.Mvc.dll
+
+
+ False
+ ..\packages\Microsoft.AspNet.Razor.3.1.2\lib\net45\System.Web.Razor.dll
+
+
+ False
+ ..\packages\Microsoft.AspNet.WebPages.3.1.2\lib\net45\System.Web.WebPages.dll
+
+
+ False
+ ..\packages\Microsoft.AspNet.WebPages.3.1.2\lib\net45\System.Web.WebPages.Deployment.dll
+
+
+ False
+ ..\packages\Microsoft.AspNet.WebPages.3.1.2\lib\net45\System.Web.WebPages.Razor.dll
+
+
+
+
+
+
+
+
+
+
+
+ True
+ ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll
+
+
+
+
+
+
+ ..\packages\Microsoft.AspNet.Web.Optimization.1.1.1\lib\net40\System.Web.Optimization.dll
+
+
+ True
+ ..\packages\WebGrease.1.5.2\lib\WebGrease.dll
+
+
+ True
+ ..\packages\Antlr.3.4.1.9004\lib\Antlr3.Runtime.dll
+
+
+
+
+ ..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.dll
+
+
+ ..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll
+
+
+ ..\packages\Microsoft.AspNet.Identity.Core.1.0.0\lib\net45\Microsoft.AspNet.Identity.Core.dll
+
+
+ ..\packages\Microsoft.AspNet.Identity.Owin.1.0.0\lib\net45\Microsoft.AspNet.Identity.Owin.dll
+
+
+ ..\packages\Microsoft.AspNet.Identity.EntityFramework.1.0.0\lib\net45\Microsoft.AspNet.Identity.EntityFramework.dll
+
+
+ ..\packages\Owin.1.0\lib\net40\Owin.dll
+
+
+ ..\packages\Microsoft.Owin.2.0.0\lib\net45\Microsoft.Owin.dll
+
+
+ ..\packages\Microsoft.Owin.Host.SystemWeb.2.0.0\lib\net45\Microsoft.Owin.Host.SystemWeb.dll
+
+
+ ..\packages\Microsoft.Owin.Security.2.0.0\lib\net45\Microsoft.Owin.Security.dll
+
+
+ ..\packages\Microsoft.Owin.Security.Facebook.2.0.0\lib\net45\Microsoft.Owin.Security.Facebook.dll
+
+
+ ..\packages\Microsoft.Owin.Security.Cookies.2.0.0\lib\net45\Microsoft.Owin.Security.Cookies.dll
+
+
+ ..\packages\Microsoft.Owin.Security.OAuth.2.0.0\lib\net45\Microsoft.Owin.Security.OAuth.dll
+
+
+ ..\packages\Microsoft.Owin.Security.Google.2.0.0\lib\net45\Microsoft.Owin.Security.Google.dll
+
+
+ ..\packages\Microsoft.Owin.Security.Twitter.2.0.0\lib\net45\Microsoft.Owin.Security.Twitter.dll
+
+
+ ..\packages\Microsoft.Owin.Security.MicrosoftAccount.2.0.0\lib\net45\Microsoft.Owin.Security.MicrosoftAccount.dll
+
+
+
+
+
+
+
+
+
+
+ Global.asax
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Web.config
+
+
+ Web.config
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {5feaec9a-4f1e-4ee7-b377-9db1b0870dac}
+ Infrastructure
+
+
+ {0bbf2d65-fffd-4272-b138-8ea4fb6fec48}
+ OpenAuth.App
+
+
+ {6108da8e-92a1-4abe-b9f5-26d64d55ca2c}
+ OpenAuth.Domain
+
+
+ {e8df8dea-e2cf-4bdb-8f4f-3f8205b0e03a}
+ OpenAuth.Repository
+
+
+
+ 10.0
+ $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
+
+
+
+
+
+
+
+
+
+
+
+ True
+ True
+ 56813
+ /
+ http://localhost:56813/
+ False
+ False
+
+
+ False
+
+
+
+
+
\ No newline at end of file
diff --git a/OpenAuth.Mvc/Startup.cs b/OpenAuth.Mvc/Startup.cs
deleted file mode 100644
index 3ff0229a..00000000
--- a/OpenAuth.Mvc/Startup.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using Microsoft.Owin;
-using Owin;
-
-[assembly: OwinStartupAttribute(typeof(OpenAuth.Mvc.Startup))]
-namespace OpenAuth.Mvc
-{
- public partial class Startup
- {
- public void Configuration(IAppBuilder app)
- {
- ConfigureAuth(app);
- }
- }
-}
diff --git a/OpenAuth.Mvc/Web.Debug.config b/OpenAuth.Mvc/Web.Debug.config
new file mode 100644
index 00000000..97aff57a
--- /dev/null
+++ b/OpenAuth.Mvc/Web.Debug.config
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/OpenAuth.Mvc/Web.Release.config b/OpenAuth.Mvc/Web.Release.config
new file mode 100644
index 00000000..063a5e11
--- /dev/null
+++ b/OpenAuth.Mvc/Web.Release.config
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OpenAuth.Repository/CodeTemplates/ReverseEngineerCodeFirst/Context.tt b/OpenAuth.Repository/CodeTemplates/ReverseEngineerCodeFirst/Context.tt
new file mode 100644
index 00000000..ce38b40c
--- /dev/null
+++ b/OpenAuth.Repository/CodeTemplates/ReverseEngineerCodeFirst/Context.tt
@@ -0,0 +1,48 @@
+<#@ template hostspecific="true" language="C#" #>
+<#@ include file="EF.Utility.CS.ttinclude" #><#@
+ output extension=".cs" #><#
+
+ var efHost = (EfTextTemplateHost)Host;
+ var code = new CodeGenerationTools(this);
+#>
+using System.Data.Entity;
+using System.Data.Entity.Infrastructure;
+using OpenAuth.Domain;
+using <#= code.EscapeNamespace(efHost.MappingNamespace) #>;
+
+namespace <#= code.EscapeNamespace(efHost.Namespace) #>
+{
+ public partial class <#= efHost.EntityContainer.Name #> : DbContext
+ {
+ static <#= efHost.EntityContainer.Name #>()
+ {
+ Database.SetInitializer<<#= efHost.EntityContainer.Name #>>(null);
+ }
+
+ public <#= efHost.EntityContainer.Name #>()
+ : base("Name=<#= efHost.EntityContainer.Name #>")
+ {
+ }
+
+<#
+ foreach (var set in efHost.EntityContainer.BaseEntitySets.OfType())
+ {
+#>
+ public DbSet<<#= set.ElementType.Name #>> <#= set.Name #> { get; set; }
+<#
+ }
+#>
+
+ protected override void OnModelCreating(DbModelBuilder modelBuilder)
+ {
+<#
+ foreach (var set in efHost.EntityContainer.BaseEntitySets.OfType())
+ {
+#>
+ modelBuilder.Configurations.Add(new <#= set.ElementType.Name #>Map());
+<#
+ }
+#>
+ }
+ }
+}
diff --git a/OpenAuth.Repository/CodeTemplates/ReverseEngineerCodeFirst/Entity.tt b/OpenAuth.Repository/CodeTemplates/ReverseEngineerCodeFirst/Entity.tt
new file mode 100644
index 00000000..fec4b78c
--- /dev/null
+++ b/OpenAuth.Repository/CodeTemplates/ReverseEngineerCodeFirst/Entity.tt
@@ -0,0 +1,75 @@
+<#@ template hostspecific="true" language="C#" #>
+<#@ include file="EF.Utility.CS.ttinclude" #><#@
+ output extension=".cs" #><#
+
+ var efHost = (EfTextTemplateHost)Host;
+ var code = new CodeGenerationTools(this);
+#>
+using System;
+using System.Collections.Generic;
+
+namespace OpenAuth.Domain
+{
+ public partial class <#= efHost.EntityType.Name #>
+ {
+<#
+ var collectionNavigations = efHost.EntityType.NavigationProperties.Where(
+ np => np.DeclaringType == efHost.EntityType
+ && np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many);
+
+ // Add a ctor to initialize any collections
+ if (collectionNavigations.Any())
+ {
+#>
+ public <#= code.Escape(efHost.EntityType) #>()
+ {
+<#
+ foreach (var navProperty in collectionNavigations)
+ {
+#>
+ this.<#= code.Escape(navProperty) #> = new List<<#= code.Escape(navProperty.ToEndMember.GetEntityType()) #>>();
+<#
+ }
+#>
+ }
+
+<#
+ }
+
+ foreach (var property in efHost.EntityType.Properties)
+ {
+ var typeUsage = code.Escape(property.TypeUsage);
+
+ // Fix-up spatial types for EF6
+ if (efHost.EntityFrameworkVersion >= new Version(6, 0)
+ && typeUsage.StartsWith("System.Data.Spatial."))
+ {
+ typeUsage = typeUsage.Replace(
+ "System.Data.Spatial.",
+ "System.Data.Entity.Spatial.");
+ }
+
+
+#>
+ <#= Accessibility.ForProperty(property) #> <#= typeUsage #> <#= code.Escape(property) #> { get; set; }
+<#
+ }
+
+ foreach (var navProperty in efHost.EntityType.NavigationProperties.Where(np => np.DeclaringType == efHost.EntityType))
+ {
+ if (navProperty.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many)
+ {
+#>
+ public virtual ICollection<<#= code.Escape(navProperty.ToEndMember.GetEntityType()) #>> <#= code.Escape(navProperty) #> { get; set; }
+<#
+ }
+ else
+ {
+#>
+ public virtual <#= code.Escape(navProperty.ToEndMember.GetEntityType()) #> <#= code.Escape(navProperty) #> { get; set; }
+<#
+ }
+ }
+#>
+ }
+}
diff --git a/OpenAuth.Repository/CodeTemplates/ReverseEngineerCodeFirst/Mapping.tt b/OpenAuth.Repository/CodeTemplates/ReverseEngineerCodeFirst/Mapping.tt
new file mode 100644
index 00000000..06f4332c
--- /dev/null
+++ b/OpenAuth.Repository/CodeTemplates/ReverseEngineerCodeFirst/Mapping.tt
@@ -0,0 +1,269 @@
+<#
+// Simplifying assumptions based on reverse engineer rules
+// - No complex types
+// - One entity container
+// - No inheritance
+// - Always have two navigation properties
+// - All associations expose FKs (except many:many)
+#>
+<#@ template hostspecific="true" language="C#" #>
+<#@ include file="EF.Utility.CS.ttinclude" #><#@
+ output extension=".cs" #><#
+
+ var efHost = (EfTextTemplateHost)Host;
+ var code = new CodeGenerationTools(this);
+
+ if (efHost.EntityFrameworkVersion >= new Version(4, 4))
+ {
+#>
+using System.ComponentModel.DataAnnotations.Schema;
+<#
+ }
+ else
+ {
+#>
+using System.ComponentModel.DataAnnotations;
+<#
+ }
+#>
+using System.Data.Entity.ModelConfiguration;
+using OpenAuth.Domain;
+
+namespace <#= code.EscapeNamespace(efHost.Namespace) #>
+{
+ public class <#= efHost.EntityType.Name #>Map : EntityTypeConfiguration<<#= efHost.EntityType.Name #>>
+ {
+ public <#= efHost.EntityType.Name #>Map()
+ {
+ // Primary Key
+<#
+ if (efHost.EntityType.KeyMembers.Count() == 1)
+ {
+#>
+ this.HasKey(t => t.<#= efHost.EntityType.KeyMembers.Single().Name #>);
+<#
+ }
+ else
+ {
+#>
+ this.HasKey(t => new { <#= string.Join(", ", efHost.EntityType.KeyMembers.Select(m => "t." + m.Name)) #> });
+<#
+ }
+#>
+
+ // Properties
+<#
+ foreach (var prop in efHost.EntityType.Properties)
+ {
+ var type = (PrimitiveType)prop.TypeUsage.EdmType;
+ var isKey = efHost.EntityType.KeyMembers.Contains(prop);
+ var storeProp = efHost.PropertyToColumnMappings[prop];
+ var sgpFacet = storeProp.TypeUsage.Facets.SingleOrDefault(f => f.Name == "StoreGeneratedPattern");
+ var storeGeneratedPattern = sgpFacet == null
+ ? StoreGeneratedPattern.None
+ : (StoreGeneratedPattern)sgpFacet.Value;
+
+ var configLines = new List();
+
+ if (type.ClrEquivalentType == typeof(int)
+ || type.ClrEquivalentType == typeof(decimal)
+ || type.ClrEquivalentType == typeof(short)
+ || type.ClrEquivalentType == typeof(long))
+ {
+ if (isKey && storeGeneratedPattern != StoreGeneratedPattern.Identity)
+ {
+ configLines.Add(".HasDatabaseGeneratedOption(DatabaseGeneratedOption.None)");
+ }
+ else if ((!isKey || efHost.EntityType.KeyMembers.Count > 1) && storeGeneratedPattern == StoreGeneratedPattern.Identity)
+ {
+ configLines.Add(".HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity)");
+ }
+ }
+
+ if (type.ClrEquivalentType == typeof(string)
+ || type.ClrEquivalentType == typeof(byte[]))
+ {
+ if (!prop.Nullable)
+ {
+ configLines.Add(".IsRequired()");
+ }
+
+ var unicodeFacet = (Facet)prop.TypeUsage.Facets.SingleOrDefault(f => f.Name == "IsUnicode");
+ if(unicodeFacet != null && !(bool)unicodeFacet.Value)
+ {
+ configLines.Add(".IsUnicode(false)");
+ }
+
+ var fixedLengthFacet = (Facet)prop.TypeUsage.Facets.SingleOrDefault(f => f.Name == "FixedLength");
+ if (fixedLengthFacet != null && (bool)fixedLengthFacet.Value)
+ {
+ configLines.Add(".IsFixedLength()");
+ }
+
+ var maxLengthFacet = (Facet)prop.TypeUsage.Facets.SingleOrDefault(f => f.Name == "MaxLength");
+ if (maxLengthFacet != null && !maxLengthFacet.IsUnbounded)
+ {
+ configLines.Add(string.Format(".HasMaxLength({0})", maxLengthFacet.Value));
+
+ if (storeGeneratedPattern == StoreGeneratedPattern.Computed
+ && type.ClrEquivalentType == typeof(byte[])
+ && (int)maxLengthFacet.Value == 8)
+ {
+ configLines.Add(".IsRowVersion()");
+ }
+ }
+ }
+
+ if(configLines.Any())
+ {
+#>
+ this.Property(t => t.<#= prop.Name #>)
+ <#= string.Join("\r\n ", configLines) #>;
+
+<#
+ }
+ }
+
+ var tableSet = efHost.TableSet;
+ var tableName = (string)tableSet.MetadataProperties["Table"].Value
+ ?? tableSet.Name;
+ var schemaName = (string)tableSet.MetadataProperties["Schema"].Value;
+#>
+ // Table & Column Mappings
+<#
+ if (schemaName == "dbo" || string.IsNullOrWhiteSpace(schemaName))
+ {
+#>
+ this.ToTable("<#= tableName #>");
+<#
+ }
+ else
+ {
+#>
+ this.ToTable("<#= tableName #>", "<#= schemaName #>");
+<#
+ }
+
+ foreach (var property in efHost.EntityType.Properties)
+ {
+#>
+ this.Property(t => t.<#= property.Name #>).HasColumnName("<#= efHost.PropertyToColumnMappings[property].Name #>");
+<#
+ }
+
+ // Find m:m relationshipsto configure
+ var manyManyRelationships = efHost.EntityType.NavigationProperties
+ .Where(np => np.DeclaringType == efHost.EntityType
+ && np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many
+ && np.FromEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many
+ && np.RelationshipType.RelationshipEndMembers.First() == np.FromEndMember); // <- ensures we only configure from one end
+
+ // Find FK relationships that this entity is the dependent of
+ var fkRelationships = efHost.EntityType.NavigationProperties
+ .Where(np => np.DeclaringType == efHost.EntityType
+ && ((AssociationType)np.RelationshipType).IsForeignKey
+ && ((AssociationType)np.RelationshipType).ReferentialConstraints.Single().ToRole == np.FromEndMember);
+
+ if(manyManyRelationships.Any() || fkRelationships.Any())
+ {
+#>
+
+ // Relationships
+<#
+ foreach (var navProperty in manyManyRelationships)
+ {
+ var otherNavProperty = navProperty.ToEndMember.GetEntityType().NavigationProperties.Where(n => n.RelationshipType == navProperty.RelationshipType && n != navProperty).Single();
+ var association = (AssociationType)navProperty.RelationshipType;
+ var mapping = efHost.ManyToManyMappings[association];
+ var item1 = mapping.Item1;
+ var mappingTableName = (string)mapping.Item1.MetadataProperties["Table"].Value
+ ?? item1.Name;
+ var mappingSchemaName = (string)item1.MetadataProperties["Schema"].Value;
+
+ // Need to ensure that FKs are decalred in the same order as the PK properties on each principal type
+ var leftType = (EntityType)navProperty.DeclaringType;
+ var leftKeyMappings = mapping.Item2[navProperty.FromEndMember];
+ var leftColumns = string.Join(", ", leftType.KeyMembers.Select(m => "\"" + leftKeyMappings[m] + "\""));
+ var rightType = (EntityType)otherNavProperty.DeclaringType;
+ var rightKeyMappings = mapping.Item2[otherNavProperty.FromEndMember];
+ var rightColumns = string.Join(", ", rightType.KeyMembers.Select(m => "\"" + rightKeyMappings[m] + "\""));
+#>
+ this.HasMany(t => t.<#= code.Escape(navProperty) #>)
+ .WithMany(t => t.<#= code.Escape(otherNavProperty) #>)
+ .Map(m =>
+ {
+<#
+ if (mappingSchemaName == "dbo" || string.IsNullOrWhiteSpace(mappingSchemaName))
+ {
+#>
+ m.ToTable("<#= mappingTableName #>");
+<#
+ }
+ else
+ {
+#>
+ m.ToTable("<#= mappingTableName #>", "<#= mappingSchemaName #>");
+<#
+ }
+#>
+ m.MapLeftKey(<#= leftColumns #>);
+ m.MapRightKey(<#= rightColumns #>);
+ });
+
+<#
+ }
+
+ foreach (var navProperty in fkRelationships)
+ {
+ var otherNavProperty = navProperty.ToEndMember.GetEntityType().NavigationProperties.Where(n => n.RelationshipType == navProperty.RelationshipType && n != navProperty).Single();
+ var association = (AssociationType)navProperty.RelationshipType;
+
+ if (navProperty.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.One)
+ {
+#>
+ this.HasRequired(t => t.<#= code.Escape(navProperty) #>)
+<#
+ }
+ else
+ {
+#>
+ this.HasOptional(t => t.<#= code.Escape(navProperty) #>)
+<#
+ }
+
+ if(navProperty.FromEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many)
+ {
+#>
+ .WithMany(t => t.<#= code.Escape(otherNavProperty) #>)
+<#
+ if(association.ReferentialConstraints.Single().ToProperties.Count == 1)
+ {
+#>
+ .HasForeignKey(d => d.<#= association.ReferentialConstraints.Single().ToProperties.Single().Name #>);
+<#
+ }
+ else
+ {
+#>
+ .HasForeignKey(d => new { <#= string.Join(", ", association.ReferentialConstraints.Single().ToProperties.Select(p => "d." + p.Name)) #> });
+<#
+ }
+ }
+ else
+ {
+ // NOTE: We can assume that this is a required:optional relationship
+ // as EDMGen will never create an optional:optional relationship
+ // because everything is one:many except PK-PK relationships which must be required
+#>
+ .WithOptional(t => t.<#= code.Escape(otherNavProperty) #>);
+<#
+ }
+ }
+#>
+
+<#
+ }
+#>
+ }
+ }
+}
diff --git a/OpenAuth.sln b/OpenAuth.sln
index 914be905..61a6387a 100644
--- a/OpenAuth.sln
+++ b/OpenAuth.sln
@@ -1,66 +1,73 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2013
-VisualStudioVersion = 12.0.21005.1
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "1 Presentation(用户UI)", "1 Presentation(用户UI)", "{57649E80-38FC-421D-82E1-BE71A786F762}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "2 Application(应用层)", "2 Application(应用层)", "{757BB00A-46B6-4B9B-9331-D6B60BE92E05}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3 Domain(领域层)", "3 Domain(领域层)", "{7618C0B1-D556-40C2-B2DD-CCECDC4E46B6}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "6 Test(测试)", "6 Test(测试)", "{C59DF46D-7815-462B-9FFF-750B2120B75B}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenAuth.App", "OpenAuth.App\OpenAuth.App.csproj", "{0BBF2D65-FFFD-4272-B138-8EA4FB6FEC48}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenAuth.Domain", "OpenAuth.Domain\OpenAuth.Domain.csproj", "{6108DA8E-92A1-4ABE-B9F5-26D64D55CA2C}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenAuth.UnitTest", "OpenAuth.UnitTest\OpenAuth.UnitTest.csproj", "{2E6B5B73-7757-43F0-8AC8-3030F7C191B8}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "4 Repository(仓储)", "4 Repository(仓储)", "{7A38939E-FC9B-44A9-BD3D-E0CE438624E6}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenAuth.Repository", "OpenAuth.Repository\OpenAuth.Repository.csproj", "{E8DF8DEA-E2CF-4BDB-8F4F-3F8205B0E03A}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenAuth.Mvc", "OpenAuth.Mvc\OpenAuth.Mvc.csproj", "{2A9D9687-1822-41CF-B7DF-819BFC0F8FE9}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {0BBF2D65-FFFD-4272-B138-8EA4FB6FEC48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {0BBF2D65-FFFD-4272-B138-8EA4FB6FEC48}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {0BBF2D65-FFFD-4272-B138-8EA4FB6FEC48}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {0BBF2D65-FFFD-4272-B138-8EA4FB6FEC48}.Release|Any CPU.Build.0 = Release|Any CPU
- {6108DA8E-92A1-4ABE-B9F5-26D64D55CA2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6108DA8E-92A1-4ABE-B9F5-26D64D55CA2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6108DA8E-92A1-4ABE-B9F5-26D64D55CA2C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {6108DA8E-92A1-4ABE-B9F5-26D64D55CA2C}.Release|Any CPU.Build.0 = Release|Any CPU
- {2E6B5B73-7757-43F0-8AC8-3030F7C191B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {2E6B5B73-7757-43F0-8AC8-3030F7C191B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2E6B5B73-7757-43F0-8AC8-3030F7C191B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2E6B5B73-7757-43F0-8AC8-3030F7C191B8}.Release|Any CPU.Build.0 = Release|Any CPU
- {E8DF8DEA-E2CF-4BDB-8F4F-3F8205B0E03A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {E8DF8DEA-E2CF-4BDB-8F4F-3F8205B0E03A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {E8DF8DEA-E2CF-4BDB-8F4F-3F8205B0E03A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E8DF8DEA-E2CF-4BDB-8F4F-3F8205B0E03A}.Release|Any CPU.Build.0 = Release|Any CPU
- {2A9D9687-1822-41CF-B7DF-819BFC0F8FE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {2A9D9687-1822-41CF-B7DF-819BFC0F8FE9}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2A9D9687-1822-41CF-B7DF-819BFC0F8FE9}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2A9D9687-1822-41CF-B7DF-819BFC0F8FE9}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- {2A9D9687-1822-41CF-B7DF-819BFC0F8FE9} = {57649E80-38FC-421D-82E1-BE71A786F762}
- {0BBF2D65-FFFD-4272-B138-8EA4FB6FEC48} = {757BB00A-46B6-4B9B-9331-D6B60BE92E05}
- {6108DA8E-92A1-4ABE-B9F5-26D64D55CA2C} = {7618C0B1-D556-40C2-B2DD-CCECDC4E46B6}
- {2E6B5B73-7757-43F0-8AC8-3030F7C191B8} = {C59DF46D-7815-462B-9FFF-750B2120B75B}
- {E8DF8DEA-E2CF-4BDB-8F4F-3F8205B0E03A} = {7A38939E-FC9B-44A9-BD3D-E0CE438624E6}
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EnterpriseLibraryConfigurationToolBinariesPath = packages\Unity.2.1.505.2\lib\NET35
- EndGlobalSection
-EndGlobal
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.21005.1
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "1 Presentation(用户UI)", "1 Presentation(用户UI)", "{57649E80-38FC-421D-82E1-BE71A786F762}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "2 Application(应用层)", "2 Application(应用层)", "{757BB00A-46B6-4B9B-9331-D6B60BE92E05}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3 Domain(领域层)", "3 Domain(领域层)", "{7618C0B1-D556-40C2-B2DD-CCECDC4E46B6}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "6 Test(测试)", "6 Test(测试)", "{C59DF46D-7815-462B-9FFF-750B2120B75B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenAuth.App", "OpenAuth.App\OpenAuth.App.csproj", "{0BBF2D65-FFFD-4272-B138-8EA4FB6FEC48}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenAuth.Domain", "OpenAuth.Domain\OpenAuth.Domain.csproj", "{6108DA8E-92A1-4ABE-B9F5-26D64D55CA2C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenAuth.UnitTest", "OpenAuth.UnitTest\OpenAuth.UnitTest.csproj", "{2E6B5B73-7757-43F0-8AC8-3030F7C191B8}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "4 功能适配层", "4 功能适配层", "{7A38939E-FC9B-44A9-BD3D-E0CE438624E6}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenAuth.Repository", "OpenAuth.Repository\OpenAuth.Repository.csproj", "{E8DF8DEA-E2CF-4BDB-8F4F-3F8205B0E03A}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenAuth.Mvc", "OpenAuth.Mvc\OpenAuth.Mvc.csproj", "{2A9D9687-1822-41CF-B7DF-819BFC0F8FE9}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Infrastructure", "Infrastructure\Infrastructure.csproj", "{5FEAEC9A-4F1E-4EE7-B377-9DB1B0870DAC}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {0BBF2D65-FFFD-4272-B138-8EA4FB6FEC48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0BBF2D65-FFFD-4272-B138-8EA4FB6FEC48}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0BBF2D65-FFFD-4272-B138-8EA4FB6FEC48}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0BBF2D65-FFFD-4272-B138-8EA4FB6FEC48}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6108DA8E-92A1-4ABE-B9F5-26D64D55CA2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6108DA8E-92A1-4ABE-B9F5-26D64D55CA2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6108DA8E-92A1-4ABE-B9F5-26D64D55CA2C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6108DA8E-92A1-4ABE-B9F5-26D64D55CA2C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2E6B5B73-7757-43F0-8AC8-3030F7C191B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2E6B5B73-7757-43F0-8AC8-3030F7C191B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2E6B5B73-7757-43F0-8AC8-3030F7C191B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2E6B5B73-7757-43F0-8AC8-3030F7C191B8}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E8DF8DEA-E2CF-4BDB-8F4F-3F8205B0E03A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E8DF8DEA-E2CF-4BDB-8F4F-3F8205B0E03A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E8DF8DEA-E2CF-4BDB-8F4F-3F8205B0E03A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E8DF8DEA-E2CF-4BDB-8F4F-3F8205B0E03A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2A9D9687-1822-41CF-B7DF-819BFC0F8FE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2A9D9687-1822-41CF-B7DF-819BFC0F8FE9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2A9D9687-1822-41CF-B7DF-819BFC0F8FE9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2A9D9687-1822-41CF-B7DF-819BFC0F8FE9}.Release|Any CPU.Build.0 = Release|Any CPU
+ {5FEAEC9A-4F1E-4EE7-B377-9DB1B0870DAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5FEAEC9A-4F1E-4EE7-B377-9DB1B0870DAC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5FEAEC9A-4F1E-4EE7-B377-9DB1B0870DAC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5FEAEC9A-4F1E-4EE7-B377-9DB1B0870DAC}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {2A9D9687-1822-41CF-B7DF-819BFC0F8FE9} = {57649E80-38FC-421D-82E1-BE71A786F762}
+ {0BBF2D65-FFFD-4272-B138-8EA4FB6FEC48} = {757BB00A-46B6-4B9B-9331-D6B60BE92E05}
+ {6108DA8E-92A1-4ABE-B9F5-26D64D55CA2C} = {7618C0B1-D556-40C2-B2DD-CCECDC4E46B6}
+ {2E6B5B73-7757-43F0-8AC8-3030F7C191B8} = {C59DF46D-7815-462B-9FFF-750B2120B75B}
+ {E8DF8DEA-E2CF-4BDB-8F4F-3F8205B0E03A} = {7A38939E-FC9B-44A9-BD3D-E0CE438624E6}
+ {5FEAEC9A-4F1E-4EE7-B377-9DB1B0870DAC} = {7A38939E-FC9B-44A9-BD3D-E0CE438624E6}
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EnterpriseLibraryConfigurationToolBinariesPath = packages\Unity.2.1.505.2\lib\NET35
+ EndGlobalSection
+EndGlobal