Skip to content
Permalink
Browse files

Migrated from EF to NHibernate - still a work in progress

  • Loading branch information
rtennys committed Nov 2, 2012
1 parent d6645ce commit d52a51d024e1fdb9840b1c4d4c26f2d4074197d3
Showing with 64,203 additions and 37,528 deletions.
  1. +1 −5 Toph.UI/App_Start/AuthConfig.cs
  2. +37 −0 Toph.UI/App_Start/IocConfig.cs
  3. +58 −129 Toph.UI/Controllers/AccountController.cs
  4. +0 −50 Toph.UI/Filters/InitializeSimpleMembershipAttribute.cs
  5. +7 −7 Toph.UI/Global.asax.cs
  6. +44 −0 Toph.UI/Infrastructure/INHibernateSessionFactoryHelper.cs
  7. +61 −0 Toph.UI/Infrastructure/INHibernateUnitOfWork.cs
  8. +60 −0 Toph.UI/Infrastructure/NHibernateRepository.cs
  9. +60 −0 Toph.UI/Infrastructure/StructureMapDependencyResolver.cs
  10. +9 −50 Toph.UI/Models/AccountModels.cs
  11. +21 −7 Toph.UI/Toph.UI.csproj
  12. +1 −23 Toph.UI/Web.config
  13. +5 −1 Toph.UI/packages.config
  14. +54 −0 Toph/Common/DataAccess/Entities.cs
  15. +83 −0 Toph/Common/DataAccess/FileRepository.cs
  16. +28 −0 Toph/Common/DataAccess/IRepository.cs
  17. +19 −0 Toph/Common/DataAccess/IUnitOfWork.cs
  18. +70 −0 Toph/Common/DataAccess/IdGenerator.cs
  19. +83 −0 Toph/Common/DataAccess/InMemoryRepository.cs
  20. +18 −0 Toph/Common/DataAccess/JsonRepository.cs
  21. +18 −0 Toph/Common/DataAccess/XmlRepository.cs
  22. +122 −0 Toph/Common/DateExtensionMethods.cs
  23. +41 −0 Toph/Common/EnumHelper.cs
  24. +17 −0 Toph/Common/ExpressionHelper.cs
  25. +419 −0 Toph/Common/ExtensionMethods.cs
  26. +50 −0 Toph/Common/Ioc.cs
  27. +77 −0 Toph/Common/JsonHelper.cs
  28. +19 −0 Toph/Common/TimerHelper.cs
  29. +17 −0 Toph/Common/_README.txt
  30. +19 −0 Toph/Domain/Entities/UserProfile.cs
  31. +36 −0 Toph/Domain/Services/UserService.cs
  32. +35 −17 Toph/Toph.csproj
  33. +5 −0 Toph/packages.config
  34. BIN packages/CommonServiceLocator.1.0/CommonServiceLocator.1.0.nupkg
  35. +15 −0 packages/CommonServiceLocator.1.0/CommonServiceLocator.1.0.nuspec
  36. +280 −0 packages/CommonServiceLocator.1.0/lib/NET35/Microsoft.Practices.ServiceLocation.XML
  37. BIN packages/CommonServiceLocator.1.0/lib/NET35/Microsoft.Practices.ServiceLocation.dll
  38. BIN packages/CommonServiceLocator.1.0/lib/NET35/Microsoft.Practices.ServiceLocation.pdb
  39. +280 −0 packages/CommonServiceLocator.1.0/lib/SL30/Microsoft.Practices.ServiceLocation.XML
  40. BIN packages/CommonServiceLocator.1.0/lib/SL30/Microsoft.Practices.ServiceLocation.dll
  41. +0 −5 packages/EntityFramework.5.0.0/Content/App.config.transform
  42. +0 −5 packages/EntityFramework.5.0.0/Content/Web.config.transform
  43. BIN packages/EntityFramework.5.0.0/EntityFramework.5.0.0.nupkg
  44. +0 −15 packages/EntityFramework.5.0.0/EntityFramework.5.0.0.nuspec
  45. BIN packages/EntityFramework.5.0.0/lib/net40/EntityFramework.dll
  46. +0 −18,061 packages/EntityFramework.5.0.0/lib/net40/EntityFramework.xml
  47. BIN packages/EntityFramework.5.0.0/lib/net45/EntityFramework.dll
  48. +0 −17,968 packages/EntityFramework.5.0.0/lib/net45/EntityFramework.xml
  49. BIN packages/EntityFramework.5.0.0/tools/EntityFramework.PS3.psd1
  50. BIN packages/EntityFramework.5.0.0/tools/EntityFramework.PowerShell.Utility.dll
  51. BIN packages/EntityFramework.5.0.0/tools/EntityFramework.PowerShell.dll
  52. BIN packages/EntityFramework.5.0.0/tools/EntityFramework.psd1
  53. +0 −777 packages/EntityFramework.5.0.0/tools/EntityFramework.psm1
  54. +0 −18 packages/EntityFramework.5.0.0/tools/Redirect.VS11.config
  55. +0 −14 packages/EntityFramework.5.0.0/tools/Redirect.config
  56. +0 −30 packages/EntityFramework.5.0.0/tools/about_EntityFramework.help.txt
  57. +0 −176 packages/EntityFramework.5.0.0/tools/init.ps1
  58. +0 −170 packages/EntityFramework.5.0.0/tools/install.ps1
  59. BIN packages/EntityFramework.5.0.0/tools/migrate.exe
  60. BIN packages/FluentNHibernate.1.3.0.733/FluentNHibernate.1.3.0.733.nupkg
  61. +18 −0 packages/FluentNHibernate.1.3.0.733/FluentNHibernate.1.3.0.733.nuspec
  62. +5,766 −0 packages/FluentNHibernate.1.3.0.733/lib/FluentNHibernate.XML
  63. BIN packages/FluentNHibernate.1.3.0.733/lib/FluentNHibernate.dll
  64. BIN packages/Iesi.Collections.3.2.0.4000/Iesi.Collections.3.2.0.4000.nupkg
  65. +16 −0 packages/Iesi.Collections.3.2.0.4000/Iesi.Collections.3.2.0.4000.nuspec
  66. BIN packages/Iesi.Collections.3.2.0.4000/lib/Net35/Iesi.Collections.dll
  67. +1,903 −0 packages/Iesi.Collections.3.2.0.4000/lib/Net35/Iesi.Collections.xml
  68. +30 −0 packages/NHibernate.3.3.2.4000/ConfigurationTemplates/FireBird.cfg.xml
  69. +16 −0 packages/NHibernate.3.3.2.4000/ConfigurationTemplates/MSSQL.cfg.xml
  70. +16 −0 packages/NHibernate.3.3.2.4000/ConfigurationTemplates/MySql.cfg.xml
  71. +18 −0 packages/NHibernate.3.3.2.4000/ConfigurationTemplates/Oracle.cfg.xml
  72. +15 −0 packages/NHibernate.3.3.2.4000/ConfigurationTemplates/PostgreSQL.cfg.xml
  73. +15 −0 packages/NHibernate.3.3.2.4000/ConfigurationTemplates/SQLite.cfg.xml
  74. +16 −0 packages/NHibernate.3.3.2.4000/ConfigurationTemplates/SybaseASE.cfg.xml
  75. +16 −0 packages/NHibernate.3.3.2.4000/ConfigurationTemplates/SybaseSQLAnywhere.cfg.xml
  76. BIN packages/NHibernate.3.3.2.4000/NHibernate.3.3.2.4000.nupkg
  77. +20 −0 packages/NHibernate.3.3.2.4000/NHibernate.3.3.2.4000.nuspec
  78. +460 −0 packages/NHibernate.3.3.2.4000/NHibernate.license.txt
  79. +54 −0 packages/NHibernate.3.3.2.4000/NHibernate.readme.html
  80. +2,550 −0 packages/NHibernate.3.3.2.4000/NHibernate.releasenotes.txt
  81. BIN packages/NHibernate.3.3.2.4000/lib/Net35/NHibernate.dll
  82. +44,072 −0 packages/NHibernate.3.3.2.4000/lib/Net35/NHibernate.xml
  83. +226 −0 packages/NHibernate.3.3.2.4000/nhibernate-configuration.xsd
  84. +1,699 −0 packages/NHibernate.3.3.2.4000/nhibernate-mapping.xsd
  85. BIN packages/RobTennyson.Common.1.2.4585.20290/RobTennyson.Common.1.2.4585.20290.nupkg
  86. +27 −0 packages/RobTennyson.Common.1.2.4585.20290/RobTennyson.Common.1.2.4585.20290.nuspec
  87. +54 −0 packages/RobTennyson.Common.1.2.4585.20290/content/Common/DataAccess/Entities.cs.pp
  88. +83 −0 packages/RobTennyson.Common.1.2.4585.20290/content/Common/DataAccess/FileRepository.cs.pp
  89. +28 −0 packages/RobTennyson.Common.1.2.4585.20290/content/Common/DataAccess/IRepository.cs.pp
  90. +19 −0 packages/RobTennyson.Common.1.2.4585.20290/content/Common/DataAccess/IUnitOfWork.cs.pp
  91. +70 −0 packages/RobTennyson.Common.1.2.4585.20290/content/Common/DataAccess/IdGenerator.cs.pp
  92. +83 −0 packages/RobTennyson.Common.1.2.4585.20290/content/Common/DataAccess/InMemoryRepository.cs.pp
  93. +18 −0 packages/RobTennyson.Common.1.2.4585.20290/content/Common/DataAccess/JsonRepository.cs.pp
  94. +18 −0 packages/RobTennyson.Common.1.2.4585.20290/content/Common/DataAccess/XmlRepository.cs.pp
  95. +122 −0 packages/RobTennyson.Common.1.2.4585.20290/content/Common/DateExtensionMethods.cs.pp
  96. +41 −0 packages/RobTennyson.Common.1.2.4585.20290/content/Common/EnumHelper.cs.pp
  97. +17 −0 packages/RobTennyson.Common.1.2.4585.20290/content/Common/ExpressionHelper.cs.pp
  98. +419 −0 packages/RobTennyson.Common.1.2.4585.20290/content/Common/ExtensionMethods.cs.pp
  99. +50 −0 packages/RobTennyson.Common.1.2.4585.20290/content/Common/Ioc.cs.pp
  100. +77 −0 packages/RobTennyson.Common.1.2.4585.20290/content/Common/JsonHelper.cs.pp
  101. +19 −0 packages/RobTennyson.Common.1.2.4585.20290/content/Common/TimerHelper.cs.pp
  102. +17 −0 packages/RobTennyson.Common.1.2.4585.20290/content/Common/_README.txt
  103. +1 −0 packages/repositories.config
  104. +3,931 −0 packages/structuremap.2.6.4.1/lib/net40/StructureMap.XML
  105. BIN packages/structuremap.2.6.4.1/lib/net40/StructureMap.dll
  106. BIN packages/structuremap.2.6.4.1/lib/net40/StructureMap.pdb
  107. BIN packages/structuremap.2.6.4.1/structuremap.2.6.4.1.nupkg
  108. +14 −0 packages/structuremap.2.6.4.1/structuremap.2.6.4.1.nuspec
@@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Web.WebPages.OAuth;
using Toph.UI.Models;

namespace Toph.UI
{
@@ -26,7 +22,7 @@ public static void RegisterAuth()
// appId: "",
// appSecret: "");

//OAuthWebSecurity.RegisterGoogleClient();
OAuthWebSecurity.RegisterGoogleClient();
}
}
}
@@ -0,0 +1,37 @@
using System;
using System.Web.Http;
using System.Web.Mvc;
using StructureMap;
using Toph.Common;
using Toph.Common.DataAccess;
using Toph.UI.Infrastructure;

namespace Toph.UI
{
public static class IocConfig
{
public static void Initialize()
{
ObjectFactory.Initialize(x =>
{
x.For<INHibernateSessionFactoryHelper>().Singleton().Use<NHibernateSessionFactoryHelper>();

x.For<INHibernateUnitOfWork>().HybridHttpOrThreadLocalScoped().Use<NHibernateUnitOfWork>();
x.For<IUnitOfWork>().Use(ctx => ctx.GetInstance<INHibernateUnitOfWork>());

x.For<IRepository>().Use<NHibernateRepository>();

x.Scan(scan =>
{
scan.AssembliesFromApplicationBaseDirectory(assembly => assembly.FullName.StartsWith("Toph"));
scan.WithDefaultConventions();
});
});

DependencyResolver.SetResolver(new StructureMapDependencyResolver(ObjectFactory.Container));
GlobalConfiguration.Configuration.DependencyResolver = new StructureMapDependencyResolver(ObjectFactory.Container);

Ioc.Initialize(new StructureMapDependencyResolver(ObjectFactory.Container));
}
}
}

0 comments on commit d52a51d

Please sign in to comment.
You can’t perform that action at this time.