Skip to content
Newer
Older
100644 1028 lines (820 sloc) 71 KB
9e71b0d Merged Tom Cabanski's branch for upgrade of NHibernate and Fluent NHi…
Billy McCafferty authored Oct 20, 2009
1 ==================================================
48abed3 @seif Upped to 2.1RC, Updated VersionHistory
seif authored Sep 9, 2012
2 S#arp Architecture 2.1.0RC for Visual Studio 2010
3 ==================================================
4
5 * #40: RavenDb support completed
6 * #44: Add IRepository.Delete(id)
7
8 -------
9
10 Assembly Dependencies ("^" notes upgraded dependencies):
11 + Castle.Core 3.1.0^
12 + Castle.Windsor 3.1.0^
13 + FluentNHibernate 1.3.0.733^
14 + NHibernate 3.3.1.4000^
15 + NewtonSoft.Json 4.5.9^
16 + RavenDB.Client 1.0.972+
17
18 -------
19
20
21 ==================================================
9da0a66 @seif Set version history and upped verion to 2.0.3
seif authored Apr 30, 2012
22 S#arp Architecture 2.0.3 for Visual Studio 2010
23 ==================================================
24
25 Issues:
26 * #42: Show the expected/requested TResult in the exception message (Thanks Joel Purra @joelpurra).
27 * #41: Decorated the attribute classes with the AttributeUsageAttribute, to restrict usage of the attributes to their intended targets. (Thanks Sandor Drieënhuizen @sandord)
28
29 -------
30
31 Assembly Dependencies ("^" notes upgraded dependencies):
32 + NHibernate 3.3^
33 + FluentNHibernate 1.3.0.727
34
35 -------
36
37
38 ==================================================
0630e32 @seif Preparation for 2.0 Release
seif authored Feb 4, 2012
39 S#arp Architecture 2.0.0 for Visual Studio 2010
40 ==================================================
41
42 Changes:
43 * Update solution structure and namespaces changed.
44 (SharpArch.Core => SharpArch.Domain)
45 (SharpArch.Data => SharpArch.Infrastructure)
46 (SharpArch.Web => SharpArch.Web.Mvc)
47 * Improved NuGet packaging.
48 * CQRS with ICommandHandler, IHandles and DomainEvents and NHibernateQuery abstract class
49 * Add ILinqRepository<> and query Specifications with implementation SharpArch.NHibernate.LinqRepository<>
50 * NHibernate runs DataAnnotations validation before persisting.
51 * EntityIdSetter and RepositoryTestsHelper moved to SharpArch.Testing.NUnit (Thanks Shatel)
52 * Remove ILMerging, seperate SharpArch packages for different features.
53 * Changes in the handling of NHibernateSessionFactory keys to allow for multi tenancy.
54
55 Issues:
56 * #36: HasUniqueDomainSignature overrides specified error message.
57 * #35: ModelBinder does not bind child entities
58 * #14: EntityDuplicateChecker does not check ValueObject properties with DomainSignature attribute
59 * #26: Allow the Id field of a form model to be nullable (Thanks @ZekeLv)
60 * #15: Explicit cast to Entity made on PreUpdate NHibernate listener
61 * #31: Explicit cast to Entity made on PreInsert NHibernate listener (Thanks @MartinHornagold)
62
63
64 -------
65
66 Assembly Dependencies ("^" notes upgraded dependencies):
67 + CastleWindsor 3.0^
68 + NHibernate 3.2^
69 + FluentNHibernate 1.3^
70 + NewtonSoft.Json 4.0^
71
72 -------
73
74 ==================================================
a1ea3f9 @alecwhittington Updated VersionHistory.txt
alecwhittington authored Aug 17, 2010
75 S#arp Architecture 1.6.0 for Visual Studio 2008 and Visual Studio 2010
76 ==================================================
77
78 New and exciting in this release:
79 * Added Configuration Caching for NHibernate (thanks Dan - SonOfMofo)
80 * Fluent NHibernate upgraded to 1.1.0.635. (thanks Seif)
81 * Added jquery.Validate.js and MicrosoftMvcJQueryValidation.js to generated web project and added references to them in master page. (thanks Igor)
82 * Generated CRUD forms enable client side validation. (thanks Igor)
83 * Updated factory assembly qualifier .svc file for Northwind sample Wcf.Web
84 * Updated invalid config sections in web.config for 2008 and 2010 templates
85 * Added NHibernateValidatorClientProvider and NHibernateValidatorProvider (thanks Igor)
86 * Added Parameter to rollback transaction when ModelState is invalid (thanks Inventti)
87 * Updated model binder to deal correctly with binding empty string to GUID Id types
88 * Updated the WcfSessionStorage class to automatically fall back to either a default (SimpleSessionStorage) or a session storage implementation of choice
89 whenever OperationContext.Current is null. This enables usage of NHibernate sessions in WCF host applications outside of WCF Operation methods without hassle.
0630e32 @seif Preparation for 2.0 Release
seif authored Feb 4, 2012
90 whenever OperationContext.Current is null. This enables usage of NHibernate sessions in WCF host applications outside of WCF Operation methods without hassle.
a1ea3f9 @alecwhittington Updated VersionHistory.txt
alecwhittington authored Aug 18, 2010
91
92 -------
93
94 Assembly Dependencies ("^" notes upgraded dependencies)
95 + FluentNhibernate.dll v1.1.0.635
96 - FluentNHibernate.dll v1.0.0.636
97
98 -------
99
100 Required Upgrade Steps and Changes:
101
102 Upgrading to S#arp Architecture 1.6 from 1.5.2 RTM requires the following steps:
103
104 #) SharpArch: Add the SharpArch.dll to your projects /lib and /tools/lib folders.
105
106 #) SharpArch: Add the FluentNHibernate.dll from the /bin to your /lib and /tools/lib folders.
107
108 #) SharpArch: Update the references in your project as needed
109
110 ==================================================
3773dde @alecwhittington Version 1.5.2 release
alecwhittington authored May 9, 2010
111 S#arp Architecture 1.5.2 for Visual Studio 2008 and Visual Studio 2010
112 ==================================================
113
114 New and exciting in this release:
115 * Merged the SharpArch.* assemblies into a single assembly (SharpArch.dll)
116 * Updated both VS 2008 and 2010 templates to reflect the use of the merged assembly
117 * Updated SharpArch.build with custom script that allows the merging of the assemblies. Copys new merged assembly in to the root /bin folder.
118 * Updated VS 2010 template to account for changes in T4 Toolbox. It is no longer neccessary to build the CrudScaffolding projects prior to their use. (thanks Igor)
119 * Updated CRUD scaffolding (both normal and enterprise) to use Html.LabelFor, Html.TextBoxFor, and Html.ValidationMessageFor crud templates. (thanks Igor)
120 * Updated Northwind sample to use merged assembly
121 * Fixed issues with BuildUrlFromExpressionForAreas (thanks Dan)
122 * Fixed issue with NHibernateSession.Init - it was possible to encounter a NullReferenceException. (thanks Dan)
123 * Added new Build bat file. ClickToBuildAndMerge.bat will build the solution and then merge the assemblies into one.
124 * Added Moq back to bin
125 * Updated the VS templates to reflect the proper tools reference in the cs.proj files. VS 2008 is now 3.5 and VS 2010 is now 4.0.
126
127 -------
128
129 Assembly Dependencies ("^" notes upgraded dependencies):
130 + SharpArch.dll
131 - SharpArch.*.dll
132
133 -------
134
135 Required Upgrade Steps and Changes:
136
137 Upgrading to S#arp Architecture 1.5.2 from 1.5 RTM requires a few steps to accommodate upgraded dependencies (steps also reflected in the Northwind sample project and VS generated projects). For reference, each of the following steps is prefixed with the dependency that that the upgrade step is associated with:
138
139 #) SharpArch: Remove the SharpArch.*.dll from your projects /lib and /tools folders.
140
141 #) SharpArch: Add the SharpArch.dll to your projects /lib and /tools folders.
142
143 #) SharpArch: Remove the references to SharpArch.*.dll from all of your projects.
144
145 #) SharpArch: Add reference to SharpArch.dll to the projects that need references to any SharpArch.*.dll
146
147
148 ==================================================
b046420 @alecwhittington Misc clean-up for packaging of final release.
alecwhittington authored Apr 25, 2010
149 S#arp Architecture 1.5 for Visual Studio 2008 and Visual Studio 2010
26b1147 @alecwhittington Applied fixes for LinkForAreasExtension as well as CRUD templates.
alecwhittington authored Mar 31, 2010
150 ==================================================
151
152 New and exciting in this release:
153 * Compatible with ASP.NET MVC 2.0 RTM
b046420 @alecwhittington Misc clean-up for packaging of final release.
alecwhittington authored Apr 25, 2010
154 * Compatible with both Visual Studio 2008 and 2010 (Separate Templates)
155 * Upgraded dependencies including NHibernate 2.1.2.4, Fluent NHibernate 1.0.0.636, Castle.Core 1.2, Castle Windsor 2.1. See complete list below
26b1147 @alecwhittington Applied fixes for LinkForAreasExtension as well as CRUD templates.
alecwhittington authored Mar 31, 2010
156 * Added Enterprise CRUD scaffolding (thanks Billy)
157 * Updated CRUD scaffolding (both normal and enterprise) to make use of MVC Areas
158 * Updated Northwind sample to MVC 2 and updated assemblies.
159 * New SharpModelBinder.cs (thanks Michael Aird)
160 * Updated target platform to x86 from Any so that the SQL lite tests will pass
161 * Upgraded jQuery to 1.4.2
162
163 -------
164
165 Assembly Dependencies ("^" notes upgraded dependencies):
b046420 @alecwhittington Misc clean-up for packaging of final release.
alecwhittington authored Apr 25, 2010
166 ^ ASP.NET MVC 2.0
167 ^ ASP.NET MVC 2.0 Futures
168 ^ Castle Windsor 2.1
169 ^ Fluent NHibernate 1.0.0.636 built against NHibernate 2.1.2
170 ^ jQuery 1.4.2
ff1038a @alecwhittington Updated VersionHistory.txt (not complete). Updated .tt files to refle…
alecwhittington authored Apr 24, 2010
171 * Json.NET 3.5 Beta 4
172 * log4net 1.2.10.0
173 * Microsoft.Practices.ServiceLocation 1.0 (aka, "Common Service Locator")
b046420 @alecwhittington Misc clean-up for packaging of final release.
alecwhittington authored Apr 25, 2010
174 ^ MvcContrib 2.0.36.0
175 ^ NHibernate 2.1.2.4000
176 ^ NHibernate.Linq 1.1.0.1001
177 ^ NHibernate.Validator 1.2.0.3001
178 ^ NUnit 2.5.0.9122 (Installer in /tools)
179 ^ Rhino.Mocks 3.6.0.0
ff1038a @alecwhittington Updated VersionHistory.txt (not complete). Updated .tt files to refle…
alecwhittington authored Apr 24, 2010
180 * System.Data.SQLite.DLL 1.0.60.0
181 * T4 Toolbox 10.3 (Installer in /tools)
26b1147 @alecwhittington Applied fixes for LinkForAreasExtension as well as CRUD templates.
alecwhittington authored Mar 31, 2010
182
ff1038a @alecwhittington Updated VersionHistory.txt (not complete). Updated .tt files to refle…
alecwhittington authored Apr 24, 2010
183 -------
184
185 Required Upgrade Steps and Changes:
186
187 #) T4 Toolbox: Uninstall your current version and install the latest found in the /tools directory.
188
189 #) Grab the latest dependencies from /bin and copy them to YourProject/lib and YourProject/tools/lib. To make it easy to figure out which DLLs go into which folder, create a new project with the included VS Project Template and copy the DLLs out of the lib folders, respectively.
190
191 #) Follow the instructions at http://www.asp.net/learn/whitepapers/aspnet-mvc2-upgrade-notes/ (skip steps 7 and 8) for upgrading your web project to an MVC 2 application.
192
193
194 Upgrading to S#arp Architecture 1.5 RTM from 1.0 RTM requires a few steps to accommodate upgraded dependencies (steps also reflected in the Northwind sample project and VS generated projects). For reference, each of the following steps is prefixed with the dependency that that the upgrade step is associated with:
195
196 #) ASP.NET MVC: If you have any previous versions of ASP.NET MVC 2 installed, you must uninstall them and optionally may install ASP.NET MVC 2.0
197
198 #) T4 Toolbox: Uninstall any previous version of T4 Toolbox and install T4 Toolbox 10.3 (installer found in /tools)
199
200 #) T4 Toolbox: Replace your version of CrudScaffolding with updated version from http://github.com/codai/Sharp-Architecture/tree/master/src/NorthwindSample/tools/CrudScaffolding/
201
b046420 @alecwhittington Misc clean-up for packaging of final release.
alecwhittington authored Apr 25, 2010
202 #) Enterprise Crud Scaffolding: Create a new project from the updated templates and add the CrudScaffoldingForEnterpriseApps project located at /<New Project Name>/Tools/CrudScaffoldingForEnterpriseApp to your project. You will then need to create a folder named "schema" under the /db folder.
203
ff1038a @alecwhittington Updated VersionHistory.txt (not complete). Updated .tt files to refle…
alecwhittington authored Apr 24, 2010
204 #) SharpArch: To easily update all the assembly references in your existing project, create a new project using the S#arp Architecture VS project template and copy the assemblies from /lib and /tools/lib to your project's respective folders (You could also copy them from the trunk's /bin folder, but using a generated project is simpler.)
205
206 #) SharpArch: Within YourProject.Web/Global.asax.cs, add AreaRegistration.RegisterAllAreas(); just above RouteRegistrar.RegisterRoutesTo(RouteTable.Routes);
207
208 #) Castle: Within YourProject.Tests/App.config, configure assemly redirects to reflect the following:
209
210 <runtime>
211 <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
212 <dependentAssembly>
213 <assemblyIdentity name="Castle.Windsor" publicKeyToken="407dd0808d44fbdc" culture="neutral"/>
b046420 @alecwhittington Misc clean-up for packaging of final release.
alecwhittington authored Apr 25, 2010
214 <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="2.1.0.0"/>
ff1038a @alecwhittington Updated VersionHistory.txt (not complete). Updated .tt files to refle…
alecwhittington authored Apr 24, 2010
215 </dependentAssembly>
216 </assemblyBinding>
217 </runtime>
218
219 #) Castle: Within YourProject.Web/Web.config, configure assemly redirects to reflect the following:
220
221 <runtime>
222 <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
223 <dependentAssembly>
224 <assemblyIdentity name="Castle.Windsor" publicKeyToken="407dd0808d44fbdc" culture="neutral"/>
b046420 @alecwhittington Misc clean-up for packaging of final release.
alecwhittington authored Apr 25, 2010
225 <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="2.1.0.0"/>
ff1038a @alecwhittington Updated VersionHistory.txt (not complete). Updated .tt files to refle…
alecwhittington authored Apr 24, 2010
226 </dependentAssembly>
227 </assemblyBinding>
228 </runtime>
b046420 @alecwhittington Misc clean-up for packaging of final release.
alecwhittington authored Apr 25, 2010
229 #) Areas: If you currently use areas, you will need to add an AreaRegistration file. The naming convention is <Area Name>AreaRegistration. To see an example file please go here:
230 http://github.com/codai/Sharp-Architecture/tree/master/src/NorthwindSample/app/Northwind.Web.Controllers/Organization/OrganizationAreaRegistration.cs
231
232 You will need to convert your YourProject.Web.Controllers/RouteRegistrar.cs to use normal MVC 2 Map Routes. If my existing file looks as such:
233
234 using System.Web.Mvc;
235 using System.Web.Routing;
236 using SharpArch.Web.Areas;
237
238 namespace MyProject.Web.Controllers
239 {
240 public class RouteRegistrar
241 {
242 public static void RegisterRoutesTo(RouteCollection routes)
243 {
244 routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
245 routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.ico(/.*)?" });
246 routes.IgnoreRoute("{*xsd}", new { xsd = @"(.*/)?.xsd(/.*)?" });
247 routes.IgnoreRoute("{*css}", new { css = @"(.*/)?.css(/.*)?" });
248
249 routes.CreateArea("Administration/Scaffolding", "MyProject.Web.Controllers.Administration.Scaffolding",
250 routes.MapRoute(null, "Administration/Scaffolding/{controller}/{action}/{id}", new { action = "Index", id = "" })
251 );
252
253 routes.CreateArea("Administration", "MyProject.Web.Controllers.Administration",
254 routes.MapRoute(null, "Administration/FacilityOperations/{action}/{id}", new{ controller = "FacilityOperations", action = "Index", id = ""}),
255 routes.MapRoute(null, "Administration/{controller}/{action}/{id}", new { controller = "Administration", action = "Index", id = "" })
256 );
257
258 //Root Area
259 routes.CreateArea("Default", "MyProject.Web.Controllers",
260 routes.MapRoute(null, "Fax/Refax/{faxNumber}/{id}/{message}", new { controller="Fax", action="Refax", faxNumber = "", id = "", message = "" }),
261 routes.MapRoute("ScheduleGrid", "Schedule/Show/{encId}/{departmentId}", new { controller = "Schedule", action = "Show", encId="", departmentId="" }),
262 routes.MapRoute("SchedulePopUp", "Schedule/PopUp/{encId}/{departmentId}", new { controller = "Schedule", action = "PopUp", encId = "", departmentId = "" }),
263 routes.MapRoute(null, "{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = "" })
264 );
265 }
266 }
267 }
268
269 It would look like this after my conversion:
270
271 using System.Web.Mvc;
272 using System.Web.Routing;
273 using SharpArch.Web.Areas;
274
275 namespace MyProject.Web.Controllers
276 {
277 public class RouteRegistrar
278 {
279 public static void RegisterRoutesTo(RouteCollection routes)
280 {
281 routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
282 routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.ico(/.*)?" });
283 routes.IgnoreRoute("{*xsd}", new { xsd = @"(.*/)?.xsd(/.*)?" });
284 routes.IgnoreRoute("{*css}", new { css = @"(.*/)?.css(/.*)?" });
285
286
287 routes.MapRoute(null, "Fax/Refax/{faxNumber}/{id}/{message}", new { controller="Fax", action="Refax", faxNumber = "", id = UrlParameter.Optional, message = "" });
288 routes.MapRoute("ScheduleGrid", "Schedule/Show/{encId}/{departmentId}", new { controller = "Schedule", action = "Show", encId=UrlParameter.Optional, departmentId=UrlParameter.Optional });
289 routes.MapRoute("SchedulePopUp", "Schedule/PopUp/{encId}/{departmentId}", new { controller = "Schedule", action = "PopUp", encId = UrlParameter.Optional, departmentId = UrlParameter.Optional });
290 routes.MapRoute(null, "{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = UrlParameter.Optional });
291 }
292 }
293 }
294
295 -------
ff1038a @alecwhittington Updated VersionHistory.txt (not complete). Updated .tt files to refle…
alecwhittington authored Apr 24, 2010
296
b046420 @alecwhittington Misc clean-up for packaging of final release.
alecwhittington authored Apr 25, 2010
297 Change Log
ff1038a @alecwhittington Updated VersionHistory.txt (not complete). Updated .tt files to refle…
alecwhittington authored Apr 24, 2010
298
b046420 @alecwhittington Misc clean-up for packaging of final release.
alecwhittington authored Apr 25, 2010
299 Due to the amount of changes that occured with the conversion to MVC 2, an accurate record was not kept. This upgrade should be considered as volatile when upgrading a previous version. In most cases, there will be no issues,
300 while others with large customized projects could encounter issues.
26b1147 @alecwhittington Applied fixes for LinkForAreasExtension as well as CRUD templates.
alecwhittington authored Mar 31, 2010
301
302 ==================================================
bd10a69 Updated Castle dependencies to be latest official release - not those…
Billy McCafferty authored Nov 12, 2009
303 S#arp Architecture 1.0 Q3 2009 for Visual Studio 2008
9e71b0d Merged Tom Cabanski's branch for upgrade of NHibernate and Fluent NHi…
Billy McCafferty authored Oct 20, 2009
304 ==================================================
305
306 New and exciting in this release:
72f494a Upgraded all relevant dependencies such as NH, FNH and Rhino Mocks; u…
Billy McCafferty authored Nov 4, 2009
307 * Upgraded dependencies including NHibernate 2.1.1 GA, Fluent NHibernate 1.0 and NHibernate LINQ 1.0
8b5206b Added appropriate credit in VersionHistory.txt for source of changes
Billy McCafferty authored Oct 28, 2009
308 * New Many-to-Many convention added to VS project template (thanks John Ledger!)
309 * New DB schema generation (as a unit test) added to VS project template (thanks indomitablehef!)
3f52622 Modified VS template to use HiLo Id generation instead of identity; A…
Billy McCafferty authored Oct 29, 2009
310 * VS generated project now uses the HiLo algorithm for identity generation
72f494a Upgraded all relevant dependencies such as NH, FNH and Rhino Mocks; u…
Billy McCafferty authored Nov 4, 2009
311 * S#arp Architecture is now HornGet compatible (http://preview.tinyurl.com/ydoolwh)
312 * S#arp Architecture has moved to GitHub (http://github.com/codai/Sharp-Architecture)
313 * The wiki documentation has gotten much more complete (http://wiki.sharparchitecture.net)
980f863 Update MvcContrib and added MvcContrib.FluentHtml to be included by d…
Billy McCafferty authored Nov 4, 2009
314 * A contrib project, led by Tom Cabanski, is well underway (http://wiki.sharparchitecture.net/SharpArchContrib.ashx)
bd10a69 Updated Castle dependencies to be latest official release - not those…
Billy McCafferty authored Nov 13, 2009
315 * WCF support within S#arp Architecture has been deprecated...it's moving to Sharp Contrib
9e71b0d Merged Tom Cabanski's branch for upgrade of NHibernate and Fluent NHi…
Billy McCafferty authored Oct 20, 2009
316
317 -------
318
72f494a Upgraded all relevant dependencies such as NH, FNH and Rhino Mocks; u…
Billy McCafferty authored Nov 4, 2009
319 Assembly Dependencies ("^" notes upgraded dependencies):
320 * ASP.NET MVC 1.0
321 * ASP.NET MVC 1.0 Futures
bd10a69 Updated Castle dependencies to be latest official release - not those…
Billy McCafferty authored Nov 13, 2009
322 ^ Castle Windsor 2.0
72f494a Upgraded all relevant dependencies such as NH, FNH and Rhino Mocks; u…
Billy McCafferty authored Nov 4, 2009
323 ^ Fluent NHibernate 1.0.0.594 built with NHibernate 2.1.1 GA
324 * jQuery 1.3.2
325 ^ Json.NET 3.5 Release 5
326 * log4net 1.2.10.0
327 * Microsoft.Practices.ServiceLocation 1.0 (aka, "Common Service Locator")
328 ^ MvcContrib 1.0.0.9
329 ^ NHibernate 2.1.1 GA
330 ^ NHibernate.Linq 1.0.0.4000 (rev 1101) built with NHibernate 2.1.1 GA
331 ^ NHibernate.Validator 1.2.0.2003 (rev 1101) built with NHibernate 2.1.1 GA
332 ^ NUnit NUnit-2.5.2.9222.msi (Installer in /tools)
333 ^ Rhino.Mocks 3.6
334 * System.Data.SQLite.DLL 1.0.60.0
bd10a69 Updated Castle dependencies to be latest official release - not those…
Billy McCafferty authored Nov 13, 2009
335 * T4 Toolbox 9.5.20.1 (Installer in /tools - not upgraded to latest available)
9e71b0d Merged Tom Cabanski's branch for upgrade of NHibernate and Fluent NHi…
Billy McCafferty authored Oct 20, 2009
336
337 -------
338
339 Required Upgrade Steps and Changes:
340
72f494a Upgraded all relevant dependencies such as NH, FNH and Rhino Mocks; u…
Billy McCafferty authored Nov 4, 2009
341 #) Grab the latest dependencies from /bin and copy them to YourProject/lib and YourProject/tools/lib. To make it easy to figure out which DLLs go into which folder, create a new project with the included VS Project Template and copy the DLLs out of the lib folders, respectively.
342
343 #) Fluent NHibernate: Some breaking changes were introduced with the latest Fluent NHibernate. With many kudos to Tom Cabanski, he has written three blog posts describing upgrade steps from 1.0 RTM and changes made to the code:
9e71b0d Merged Tom Cabanski's branch for upgrade of NHibernate and Fluent NHi…
Billy McCafferty authored Oct 20, 2009
344 1) http://tomcabanski.spaces.live.com/blog/cns!E0D3617496209F45!124.entry
345 2) http://tomcabanski.spaces.live.com/blog/cns!E0D3617496209F45!125.entry
346 3) http://tomcabanski.spaces.live.com/blog/cns!E0D3617496209F45!166.entry
347
72f494a Upgraded all relevant dependencies such as NH, FNH and Rhino Mocks; u…
Billy McCafferty authored Nov 4, 2009
348 #) NUnit: Install NUnit 2.5.2 using the installer found in /tools (optionally uninstalling previous versions)
349
350 #) Castle: Within YourProject.Tests/App.config, you may drop the following assembly redirect if it exists:
351
352 <runtime>
353 <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
354 <dependentAssembly>
355 <assemblyIdentity name="Castle.Windsor" publicKeyToken="407dd0808d44fbdc" culture="neutral"/>
356 <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="2.0.0.0"/>
357 </dependentAssembly>
358 </assemblyBinding>
359 </runtime>
360
7532567 Added many-to-many convention to VS project template and unit test to…
Billy McCafferty authored Oct 28, 2009
361 -------
362
363 Change Log
364
c0aab75 Fixed issue 12 for improving model binder for collections of entities…
Billy McCafferty authored Oct 29, 2009
365 SharpArch.Core:
366 * /PersistenceSupport/IDbContext.cs: Modified BeginTransaction to return an IDisposable for use with the "using" statment. (Issue 17)
367
7532567 Added many-to-many convention to VS project template and unit test to…
Billy McCafferty authored Oct 28, 2009
368 SharpArch.Data:
c0aab75 Fixed issue 12 for improving model binder for collections of entities…
Billy McCafferty authored Oct 29, 2009
369 * /NHibernate/DbContext.cs: Now returns the ITransaction as IDisposable for use with "using" statements. (Issue 17)
7532567 Added many-to-many convention to VS project template and unit test to…
Billy McCafferty authored Oct 28, 2009
370 * /NHibernate/NHibernateSession.cs:
58b274c Added note concerning latest changes
Billy McCafferty authored Nov 2, 2009
371 - Modified ConfigureNHibernate() to allow configuration of NHibernate without a config file; allows you to use FNH exclusively. (Patch from Kyle)
7532567 Added many-to-many convention to VS project template and unit test to…
Billy McCafferty authored Oct 28, 2009
372 - GetSessionFactoryFor() now returns null if the supplied factory key was not found; this would previously blow up.
373
374 SharpArch.Tests:
375 * /SharpArch.Data/NHibernateSessionTests.cs: Added this set of tests to demonstrate how to initialize NHibernate with and without a config file.
376
377 SharpArch.VsSharpArchTemplate
980f863 Update MvcContrib and added MvcContrib.FluentHtml to be included by d…
Billy McCafferty authored Nov 4, 2009
378 * Added MvcContrib.FluentHtml to YourProject.Web along with namespace inclusion in its web.config
7532567 Added many-to-many convention to VS project template and unit test to…
Billy McCafferty authored Oct 28, 2009
379 * Removed WCF assemblies from VS generated project (these are moving to the Contrib project)
c0aab75 Fixed issue 12 for improving model binder for collections of entities…
Billy McCafferty authored Oct 29, 2009
380 * /SharpArchApplicationTemplate/SharpArchProject.Data/NHibernateMaps/Conventions/PrimaryKeyConvention.cs: Changed default Id generation to use the HiLo algorithm. Requires a hibernate_unique_key table with a next_hi int column. (Issue 5)
7532567 Added many-to-many convention to VS project template and unit test to…
Billy McCafferty authored Oct 28, 2009
381 * /SharpArchApplicationTemplate/SharpArchProject.Data/NHibernateMaps/Conventions/ForeignKeyConvention.cs, HasManyToManyConvention.cs, ManyToManyTableNameConvention.cs: Added classes to support Many-to-Many convention.
382 * /SharpArchApplicationTemplate/SharpArchProject.Data/NHibernateMaps/AutoPersistenceModelGenerator.cs: Modified GetConventions() to account for new Many-to-Many convention.
383 * /SharpArchApplicationTemplate/SharpArchProject.Tests/SharpArchProject.Data/NHibernateMaps/MappingIntegrationTests.cs: Added CanGenerateDatabaseSchema() test to output database schema SQL to console.
384
c0aab75 Fixed issue 12 for improving model binder for collections of entities…
Billy McCafferty authored Oct 29, 2009
385 SharpArch.Web:
386 * /ModelBinder/EntityCollectionValueProviderResult.cs: Fixed problem with GUID Ids. (Issue 12)
387
9e71b0d Merged Tom Cabanski's branch for upgrade of NHibernate and Fluent NHi…
Billy McCafferty authored Oct 20, 2009
388 ----------------------------------------------
389 ----------------------------------------------
390 S#arp Architecture 1.0 RTM
391 ----------------------------------------------
392 ----------------------------------------------
393
394 New and exciting in this release:
395 * Compatible with ASP.NET MVC 1.0
396 * All upgraded dependencies including NHibernate 2.1 CR 1
397 * We now have a community site at http://www.sharparchitecture.net, still a work in progress (a flippin' ginormous thank you to Kyle Baley for setting this up)
398 * S#arp Architecture documentation may now be found at http://wiki.sharparchitecture.net, still a work in progress (a huge thanks to Joe Lowrance for migrating the docs)
399 * Strongly typed action link for areas (SharpArch.Web.Areas.ActionLinkForAreas<> and BuildUrlFromExpressionForAreas<> - thanks Brad Buhrkuhl!)
400 * Fluent NHibernate now using configuration classes
401 * (Re)Introduced support for IIS 7 integrated mode
402 * Support for WCF has been added as SharpArch.Wcf for server support and SharpArch.WcfClient.Castle for auto-closing of the connection on the client (thanks Frank Laub!)
403 * SharpModelBinder has been introduced for much better form binding, including support for all association types; e.g., one-to-one, one-to-many, and many-to-one Entity associations
404 * Support for multiple databases outside of WCF communications (thanks Russell Thatcher, David Longnecker, James Broome and Howard van Rooijen for suggestions and input!)
405
406 -------
407
408 Assembly Dependencies:
409 * ASP.NET MVC 1.0
410 * ASP.NET MVC 1.0 Futures
411 * Castle Windsor 2.0
412 * Fluent NHibernate 0.1 (rev 539) built against NHibernate 2.1 CR 1
413 * jQuery 1.3.2
414 * Json.NET 3.5 Beta 4
415 * log4net 1.2.10.0
416 * Microsoft.Practices.ServiceLocation 1.0 (aka, "Common Service Locator")
417 * MvcContrib for MVC 1.0 (rev 959)
418 * NHibernate 2.1.0.3001 (2.1 CR 1)
419 * NHibernate.Linq 1.0 (rev 935)
420 * NHibernate.Validator 1.2.0.1004 (rev 935)
421 * NUnit 2.5.0.9122 (Installer in /tools)
422 * Rhino.Mocks 3.5.0.1337
423 * System.Data.SQLite.DLL 1.0.60.0
424 * T4 Toolbox 9.5.20.1 (Installer in /tools)
425
426 -------
427
428 Required Upgrade Steps
429
430 Upgrading to S#arp Architecture 1.0 RTM from RC 2 requires a few steps to accommodate upgraded dependencies (steps also reflected in the Northwind sample project and VS generated projects). For reference, each of the following steps is prefixed with the dependency that that the upgrade step is associated with:
431
432 #) ASP.NET MVC: If you have any previous versions of ASP.NET MVC installed, you must uninstall them and optionally may install ASP.NET MVC 1.0
433
434 #) NUnit: Install NUnit 2.5 using the installer found within /tools (optionally uninstalling previous versions)
435
436 #) NUnit: Drop any usings of "using NUnit.Framework.SyntaxHelpers;" - this namespace no longer exists and has been merged into the NUnit.Framework namespace
437
438 #) NUnit: Change any use of ExpectedException attributes to use Assert.Throws instead; see http://mint.litemedia.se/2009/05/30/new-expectedexception-model-in-nunit-25/ for details
439
440 #) T4 Toolbox: Uninstall any previous version of T4 Toolbox and install T4 Toolbox 9.5.20.1 (installer found in /tools)
441
442 #) T4 Toolbox: Replace your version of CrudScaffolding/EntityScaffoldingDetails.tt and CrudScaffolding/Templates/ScaffoldingGenerator.tt with updated versions from http://sharp-architecture.googlecode.com/svn/trunk/src/NorthwindSample/tools/CrudScaffolding/
443
444 #) SharpArch: To easily update all the assembly references in your existing project, create a new project using the S#arp Architecture VS project template and copy the assemblies from /lib and /tools/lib to your project's respective folders (You could also copy them from the trunk's /bin folder, but using a generated project is simpler.)
445
446 #) SharpArch: Within YourProject.Tests/YourProject.Data/NHibernateMaps/MappingIntegrationTests.cs, add a reference to "using SharpArch.Testing.NHibernate;" to accommodate the move of RepositoryTestsHelper to the new namespace.
447
448 #) SharpArch: Upgrade YourProject.Tests/YourProject.Data/NHibernateMaps/MappingIntegrationTests.cs to accommodate the changes that were made to support multiple databases (if not done, you will likely have breaking unit tests). To do so, compare your MappingIntegrationTests.cs to the one at http://sharp-architecture.googlecode.com/svn/trunk/src/NorthwindSample/tests/Northwind.Tests/Northwind.Data/NHibernateMaps/MappingIntegrationTests.cs. The necessary change is the introduction of the session factory key.
449
450 #) SharpArch: Within YourProject.Web/Global.asax.cs, migrate the call to NHibernateSession.Init() from the Global.asax.cs class' Init() method to its Application_BeginRequest() method using the following as an example: http://sharp-architecture.googlecode.com/svn/trunk/src/NorthwindSample/app/Northwind.Web/Global.asax.cs
451
452 #) Fluent NHibernate: Within Fluent NHibernate class maps and overrides, replace .WithKeyColumn("YourColumnName") with .KeyColumnNames.Add("YourColumnName")
453
454 #) Fluent NHibernate: If you're using Fluent NHibernate Auto Mapping, upgrade to Fluent NHibernate class conventions within YourProject.Data (You can look at the Northwind sample project for implementation examples but the Northwind DB is far from consistent and so there's an assortment of conventions and overrides in the Northwind sample project; accordingly, you'll have better luck having VS generate a S#arp Architecture project and then look at the internals of the generated project.):
455 *) Add a folder under /NHibernateMaps and add convention classes (see VS generated project for examples)
456 *) Within /NHibernateMaps/AutoPersistenceModelGenerator.cs, modify mappings setup to use new convention-per-class approach (see VS generated project for example)
457 *) See http://wiki.fluentnhibernate.org/show/ConvertingToNewStyleConventions for further guidance
458
459 #) NHibernate: Within YourProject.Tests.YourProject.Data.NHibernateMaps.MappingIntegrationTests.cs, modify CanConfirmDatabaseMatchesMappings() to reflect the following:
460 [Test]
461 public void CanConfirmDatabaseMatchesMappings() {
462 IDictionary<string, IClassMetadata> allClassMetadata =
463 NHibernateSession.SessionFactory.GetAllClassMetadata();
464
465 foreach (KeyValuePair<string, IClassMetadata> entry in allClassMetadata) {
466 NHibernateSession.Current.CreateCriteria(entry.Value.GetMappedClass(EntityMode.Poco))
467 .SetMaxResults(0).List();
468 }
469 }
470
471 #) NHibernate: Within YourProject.Tests, add a reference to NHibernate.ByteCode.Castle.dll
472
473 #) NHibernate: Within YourProject.Web, add a reference to NHibernate.ByteCode.Castle.dll
474
475 #) Castle: Within YourProject.Tests/App.config, configure assemly redirects to reflect the following:
476
477 <runtime>
478 <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
479 <dependentAssembly>
480 <assemblyIdentity name="Castle.Windsor" publicKeyToken="407dd0808d44fbdc" culture="neutral"/>
481 <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="2.0.0.0"/>
482 </dependentAssembly>
483 </assemblyBinding>
484 </runtime>
485
486 #) Castle: Within YourProject.Web/Web.config, configure assemly redirects to reflect the following:
487
488 <runtime>
489 <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
490 <dependentAssembly>
491 <assemblyIdentity name="Castle.Windsor" publicKeyToken="407dd0808d44fbdc" culture="neutral"/>
492 <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="2.0.0.0"/>
493 </dependentAssembly>
494 </assemblyBinding>
495 </runtime>
496
497 #) NHibernate: Within YourProject.Tests/Hibernate.cfg.xml, add the following property:
498 <property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property>
499
500 #) NHibernate: Within YourProject.Web/NHibernate.config, add the following property:
501 <property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property>
502
503 -------
504
505 Change Log
506
507 Solution Wide Changes:
508
509 * Updated all dependencies; only NHibernate and Fluent NHibernate had breaking changes, which were addresed in the upgrade steps above
510
511 =======
512 Changes to SharpArch:
513
514 SharpArch.Core:
515 * Possibly BREAKING CHANGE (but not likely) ~ /DomainModel/BaseObject.cs: Changed HasSameObjectSignatureAs() to be public instead of protected since GetSignatureProperties() is also public and is a useful method to expose. This will cause a build error if you've overridden this method; to fix, simply change the visibility of the overridden method to public.
516 * /DomainModel/BaseObjectEqualityComparer.cs: Added this class to provide support for LINQ set operators, such as Intersect.
517 * /DomainModel/Entity.cs: Modified the GetHashCode to cache the hashcode calculation and to use the object's Id in the calculation for persistent objects. This was done because GetHashCode() was previously ignoring the Id property for Entities; therefore, two Entity instances which didn't have any domain signature properties were returning different hashcode values even if they had the same Id.
518
519 SharpArch.Data:
520 * Possibly BREAKING CHANGE (but not likely) ~ /NHibernate/DbContext.cs: Removed singleton behavior and added constructor parameter for session factory key to support multiple databases.
521 * /NHibernate/EntityDuplicateChecker.cs: Added factory key lookup for support of multiple databases.
522 * Possibly BREAKING CHANGE (but not likely) ~ /NHibernate/ISessionStorage.cs: Added FactoryKey property to support look-up for multiple database support and also moved this interface to its own file - I prefer having one class/interface per file.
523 * /NHibernate/NHibernateInitializer.cs: Added this class to assist with initializing the NHibernate session once and only once; this was introduced to help support running in IIS 7 integrated mode.
524 * Possibly BREAKING CHANGE (but not likely) ~ /NHibernate/NHibernateSession.cs: Changed SessionFactory and Storage to be Dictionary objects to support multiple databases; added plural named properties of each, accordingly. The singular version remain for backward compatibility and to make it easier to maintain a single database application.
525 * /NHibernate/NHibernateSession.cs: Within CreateSessionFactoryFor(), added ".ConventionDiscovery.AddAssembly(assembly);" calls after "m.FluentMappings.AddFromAssembly(assembly)" for altering non-automapped conventions. (Issue-101)
526 * /NHibernate/Repository.cs: Added factory key lookup for support of multiple databases. Also now passing factory key to DB context, accordingly.
527 * /NHibernate/SessionFactoryAttribute.cs: Introduced this attribute to be used on repositories to designate which session factory its associated with. It does not need to be used for single database scenarios or for your "default" database.
528
529 SharpArch.Testing.NUnit/MbUnit:
530 * /NHibernate/RepositoryTestsHelper.cs: Dropped the previously 4th parameter, a bool for formatting, to support the modified signature of NHibernate's SchemaExport.Execute()
531 * BREAKING CHANGE ~ /NHibernate/RepositoryTestsHelper.cs: Moved this helper class to SharpArch.Testing.NHibernate as it does not have dependencies on NUnit nor on MbUnit
532
533 SharpArch.Web:
534 * /CommonValidator/MvcValidationAdapter.cs: Added method overload to allow custom prefix to model state errors instead of the class name.
535 * /ModelBinder/EntityValueProviderResult.cs: Added support for Guid Ids
536
537 SharpArch.Wcf:
538 * Added this class library to support WCF. WCF does NOT currently support multiple databases.
539
540 SharpArch.Web
541 * /Areas/LinkForAreasExtensions.cs: Added this class to provide the strongly typed ActionLinkForAreas<> and BuildUrlFromExpressionForAreas<>.
542 * /Areas/LinkForAreasExtensions.cs: Added this class to provide the strongly typed ActionLinkForAreas<> and BuildUrlFromExpressionForAreas<>. Accordingly, you can now replace hardcoded links to areas with Html.ActionLinkForAreas<>. You'll also likely want to add the following to your web.config's namespaces tag so that you don't have to import it for every ActionLinkForAreas: <add namespace="SharpArch.Web.Areas" />
543 * /CommonValidator/ValidatableModelBinder.cs: Marked this as obsolete in favor of using SharpModelBinder (referenced next)
544 * /ModelBinder/SharpModelBinder.cs: Added this model binder to replace the use of DefaultModelBinder (see documentation for details)
545 * /ModelBinder/EntityValueProviderResult.cs: Added this support class for SharpModelBinder (see documentation for details)
546 * /NHibernate/WebSessionStorage: Added overloaded constructor to accept a factory key to support multiple database sessions.
547 * /NHibernate/TransactionAttribute: Added option for passing in factory key to support multiple database. Also modified this transaction to rollback the transaction if a problem is encountered.
548
549 =======
550 Changes to Northwind (all changes also made to VS project template and Employee CRUD pages):
551
552 CrudScaffolding
553 * /Templates/Tests/Web/Controllers/ControllerTestsTemplate.tt: Modified CanEnsureEntityNameCreationIsValid() to account for fact that ModelState is not being modified during testing (it'll redirect due to invalid entity, but it won't show errors in the ModelState by default)
554 * /Templates/Web/Controllers/ControllerTemplate.tt:
555 - Added an EntityNameFormViewModel as a DTO between the controller and the entity form in both the Create/Edit (GET) action methods
556 - Modified Create/Edit (POST) to account for SharpModelBinder behavior
557 * /Templates/Web/Views/DomainObjectFormTemplate.tt:
558 - Replaced "id" hidden input id to be "EntityName.Id" to support SharpModelBinder
559 - Now inherits from ViewUserControl with a generic parameter of a form view model DTO to make it easier to send other items to the form such as lists for drop down boxes
560 - Changed hidden "id" input to be named "EntityName.Id" to support binding within SharpModelBinder
561 - Changed cancel button to use Html.BuildUrlFromExpression instead of hardcoding the back link
562 * /Templates/Web/Views/EditTemplate.tt:
563 - Got rid of redundant passing of ViewData to user control
564 - Added use of enum for looking for page message so that the ViewData index is strongly typed
565 * /Templates/Web/Views/IndexTemplate.tt: Now using Html.BuildUrlFromExpression for the URL behind the cancel button (more strongly typed)
566 * /Templates/Web/Views/Show.tt: Wrapped all outputs within Server.HtmlEncode() to protect against JavaScript injection attacks
567 * /Templates/Web/Views/*.tt: Changed <h2> to <h1> at top of pages since they're primary page titles
568
569 Northwind.Tests
570 * /Northwind.Data/NHibernateMaps/MappingIntegrationTests.cs: Introduced factory key to isolate the integration tests session factory from the other tests. Also set the SessionFactory and Storage to null before and after running the test for backwards compatibility reasons; in this way, existing tests that assume a single database don't have to be modified to account for the fact that a different session factory is being used by the MappingIntegrationTests class.
571
572 Northwind.Web
573 * /Global.asax.cs:
574 - Added SharpModelBinder as the default binder with "ModelBinders.Binders.DefaultBinder = new SharpModelBinder();"
575 - Moved initialization of NHibernate session to Application_BeginRequest with new NHibernateInitializer to support IIS 7 integrated mode
576
577 Northwind.Web.Controllers
578 * /ControllerEnums.cs: Added this class to hold, at the very least, a strongly typed enum for global items added to ViewData.
579
580 ----------------------------------------------
581 ----------------------------------------------
582 S#arp Architecture 1.0.48.410 RC 2 with ASP.NET MVC RC 2 and NHibernate 2.0.1
583 ----------------------------------------------
584 ----------------------------------------------
585
586 Version Acknowledgements:
587 * A huge thanks goes out to Kyle Baley and Simone Busoli who have been tremendously assistive to the #Arch community and the project during this recent push
588
589 New and exciting in this release:
590 * Compatible with ASP.NET MVC RC 2
591 * VS template project includes Fluent NHibernate auto persistence mapping by default
592 * Much more complete and extensible CRUD scaffolding generator - it's completely touch-up free for many scenarios
593 * Performance of unit tests using SQLite has been improved 20% (thanks Jay Oliver!)
594 * Added crazy cool anti-forgery voodoo magic to the CRUD scaffolding generator for creating, editing and deleting items (uh, thanks MVC team!)
595 * New empty class library, called YourProject.ApplicationServices, now gets added to VS generated projects
596 * S#arp Architecture now has a CI home with http://teamcity.codebetter.com/overview.html (thanks Kyle and Simone!)
597
598 -------
599
600 Assembly Dependencies:
601 * ASP.NET MVC RC 2
602 * ASP.NET MVC RC 1 Futures
603 * Castle 1.0 RC3 (rev 1038)
604 * Fluent NHibernate 0.1 (rev 381 - Does NOT include very recent Fluent NHibernate convention interfaces)
605 * jQuery 1.3.2
606 * Json.NET 3.5 Beta 2
607 * Microsoft.Practices.ServiceLocation 1.0 (aka, "Common Service Locator")
608 * MvcContrib for MVC RC (rev 903)
609 * NHibernate 2.0.1 GA
610 * NHibernate.Validator 1.2.0 (rev 809)
611 * NUnit 2.4.8
612 * Rhino.Mocks 3.5.0.1337
613 * System.Data.SQLite.DLL 1.0.60.0
614 * T4 Toolbox 9.1.20.1
615
616 -------
617
618 Upgrading to S#arp Architecture RC 2 from Beta (steps also reflected in the Northwind sample project):
619 #) If you have any previous versions of ASP.NET MVC installed, uninstall them and install ASP.NET MVC RC 2
620 #) Install NUnit 2.4.8
621 #) Upgrade T4 Toolbox to 9.1.20.1 AND PATCH IT, following the instructions in the "Installing and Configuring Prerequisites" of the documentation
622 #) Update assembly dependencies from trunk/bin into your application's lib and /tools/lib folders
623 #) Modify using statements from "using NHibernate.Validator;" to "using NHibernate.Validator.Constraints;"
624 #) Change all reference to anyEntity.ID to anyEntity.Id.
625 #) Add the following assembly redirect to YourProject.Web/web.config and YourProject.Tests/App.config (since some dependencies will be looking for an older version of Iesi.Collections):
626 <dependentAssembly>
627 <assemblyIdentity name="Iesi.Collections" publicKeyToken="AA95F207798DFDB4" culture="neutral"/>
628 <bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="1.0.1.0"/>
629 </dependentAssembly>
630 #) Within your Fluent NHibernate mapping files, rename .IsInverse() to .Inverse()
631 #) If you're using Fluent NHibernate auto mapping persistence, do the following account for the fact that you can no longer inherit from AutoMap:
632 1) For each class that inherits from AutoMap, remove the AutoMap inheritance and implement IAutoMappingOverride<YourEntity> instead.
633 2) Move the contents of the constructor, which sets up the overrides, to the body of the following, prefixing each line with "map.":
634 public void Override(AutoMap<YourEntity> mapping) {
635 // Your mapping overrides; e.g., mapping.Id(...);
636 }
637 3) Within YourProject.Data.NHibernateMaps.AutoPersistenceModelGenerator, append the following extension method to the mappings creation:
638 .MapConventionOverridesFromAssemblyOf<YourEntityClassMapName>();
639 #) Update YourProject.Web/Scripts/jquery*.js with 1.3.2 versions available in Northwind sample project
640 #) Update YourProject.Web/Views/web.config to reflect the respective content from the Northwind sample project
641 #) Within YourProject.Web/Global.asax.cs, change the following line:
642 container.RegisterControllersByArea(typeof(HomeController).Assembly);
643 to:
644 container.RegisterControllers(typeof(HomeController).Assembly);
645 #) Within YourProject.Web/Global.asax.cs, modify the Init() to reflect the locking mechanism shown within
646 #) Within YourProject.Tests/App.config, update the nunit assembly redirect to go to version 2.4.8.0
647 #) Change calls to EntityIdSetter<>.SetIdOf() to EntityIdSetter.SetIdOf<>()
648 #) Update your Site.master to provide an overwritable title and to account for a known bug in MVC RC 1, described at http://haacked.com/archive/2009/01/27/controls-collection-cannot-be-modified-issue-with-asp.net-mvc-rc1.aspx
649 #) Either replace your CrudScaffolding project with a duplicate of the one from the Northwind project or use the guidance discussed in the below change log for modifications
650 #) (Optional) Add the following line to Global.asax.cs to Application_Start if you're client side code looks for dot-notation in generated input names:
651 HtmlHelper.IdAttributeDotReplacement = ".";
652 #) (Optional) Add Northwind.Web/Scripts/jquery-1.2.6.min-vsdoc.js and jquery-1.2.6-vsdoc.js to your project to enable jQuery IntelliSense
653 #) (Optional) Get rid of the code behind pages in favor of ViewMasterPage, ViewPage<Whatever>, ViewUserControl<Whatever> inheritance in the view's Master/Page/Control declaration. E.g.: Inherits="System.Web.Mvc.ViewPage<Employee>". Be sure to include System.Web.Mvc before ViewPage and either move your domain imports ABOVE the page declaration or fully qualify the namespaces of your model object.
654 #) (Optional) Add MvcBuildViews to YourProject.Web.csproj and alter the Target/AfterBuild, following the details in the ASP.NET MVC RC release notes
655
656 -------
657
658 Changes to /src:
659
660 Solution Wide:
661 * BREAKING CHANGE ~ Changed Entity.ID to Entity.Id for compliance with naming conventions (When you upgrade, don't do a simple find and replace as you'll change IDictionary, GUID and other such items; also pay attention when updating your IAutoPersistenceModelGenerator)
662
663 VS Project Template:
664 * A CommonAssemblyInfo.cs is now included and added to all projects
665 * A YourProject.ApplicationServices class libraries now comes automatically with VS generated projects
666
667 CrudScaffolding Generator:
668 * ScaffoldingGeneratorCommand.tt: Commented out "generator.Run()" by default to avoid inadvertent code generation
669 * Added reference to SharpArch.Core to have design by contract capablities
670 * Added reference to Inflector.Net.Inflector for pluralizing words
671 * Added assembly inclusion at the top of /Templates/BaseTemplate.tt and ScaffoldingGenerator.tt
672 * Replaced all references to "Pluralizer.ToPlural" with "Inflector.Net.Inflector.Pluralize"
673 * Modified /Templates/Web/Views/*.tt page/control declarations, and added imports where necessary, to support removal of code-behind pages
674 * Deleted Pluralizer.tt in favor of using Inflector.Net
675 * Deleted /Templates/Data/NHibernateMaps/ClassMapTemplate.tt due to VS project template and Northwind now using Fluent NHibernate auto persistence model
676 * Deleted /Templates/Web/Views/GeneralCodeBehindTemplate.tt and GeneralDesignerTemplate.tt because they're no longer necessary (nor recommended)
677 * Deleted /ScaffoldingEnums.tt as the enum has been moved to the newly added /EntityScaffoldingDetails.tt; had to also drop the include of this file from /Templates/ScaffoldingGenerator.tt
678 * Within /Templates/ScaffoldingGenerator.tt:
679 - Dropped import of GeneralCodeBehindTemplate.tt, GeneralDesignerTemplate.tt and Pluralizer.tt
680 - Dropped move of code behind and designer pages from MoveViewFilesTo()
681 - Dropped GenerateGeneralCodeBehindAndDesignerForViewPage() and all calls to it
682 - Dropped all calls to GeneralCodeBehindTemplate and GeneralDesignerTemplate
683 * Added /EntityScaffoldingDetails.tt to have a more expressive and complete means of generating entities
684 * Replaced all use of namespaceHierarchy, domainObjectName, properties, and artifactsToGenerate with instance of entityScaffoldingDetails; e.g.,
685 - Replaced parameter set "domainObjectName, properties, namespaceHierarchy" with "entityScaffoldingDetails"
686 - Replaced "domainObjectName" with "entityScaffoldingDetails.EntityName"
687 - Replaced "namespaceHierarchy" with "entityScaffoldingDetails.NamespaceHierarchy"
688 - Replaced "artifactsToGenerate" with "entityScaffoldingDetails.ArtifactsToGenerate"
689 - Replaced "DomainObjectNamePlural" with "entityScaffoldingDetails.EntityNamePlural"
690 * Moved plural and camel case helper methods from /Templates/BaseTemplate.tt to EntityScaffoldingDetails.tt
691 * Added BaseTemplate.EntityBaseUrl to be able to retrieve the base URL of the entity being generated
692 * In each template, changed each constructor to accept EntityScaffoldingDetails and pass it to the constructor of BaseTemplate.tt
693 * Changed constructor of BaseTemplate.tt to accept EntityScaffoldingDetails and share it as a protected value to subclass templates
694 * Changed templates as follows (in this order):
695 - Replaced "DomainObjectNamePluralCamelCase" with "EntityScaffoldingDetails.EntityNamePluralCamelCase"
696 - Replaced "DomainObjectNamePlural" with "EntityScaffoldingDetails.EntityNamePlural"
697 - Replaced "DomainObjectNameCamelCase" with "EntityScaffoldingDetails.EntityNameCamelCase"
698 - Replaced "DomainObjectName" with "EntityScaffoldingDetails.EntityName"
699 - Carefully replaced "NamespaceHierarchy" with "EntityScaffoldingDetails.NamespaceHierarchy"
700 - Replaced "foreach (string propertyName in Properties.AllKey)" with "foreach (EntityProperty property in EntityScaffoldingDetails.EntityProperties)" and adjusted loop accordingly
701 * Within /Templates/Tests/Core/Web/Controllers/ControllerTestsTemplate.tt, deleted CanEnsureEntityCreationIsValid() method; it's doesn't prove anything with the new use of ModelState.IsValid on form submissions
702
703 SharpArch.Core
704 * /DomainModel/BaseObject.cs: Modified Equals() to account for the fact that an object may be proxied by NHibernate when compared.
705 * /DomainModel/Entity.cs: Id is now excluded for XML serialization; see documentation FAQ for work around for Id serialization.
706 * /DomainModel/ValueObject.cs: == and != operator overloads have been added.
707 * /DomainModel/ValidatableObject.cs: This new class extracts the concrete validation that was being performed in Entity into a reusable superclass. (Entity now inherits from it.)
708 * BREAKING CHANGE ~ /PersistenceSupport/IRepository.cs: Changed GetAll and FindAll to return an IList rather than a List to be more loosely coupled.
709 * BREAKING CHANGE ~ /PersistenceSupport/NHibernate/INHibernateRepository.cs: Changed FindAll to return an IList rather than a List to be more loosely coupled.
710
711 SharpArch.Data
712 * Between RC 1 and 2, added and then removed /NHibernate/FluentNHibernate/IAutoPeristenceModelConventionOverride.cs: In the RC 1 compatible code, I added this interface to serve as a base class for any Fluent NHibernate override classes; this was introduced because it's no longer allowed to inherit from AutoMap<> for overriding conventions. For RC 2, James Gregory, developer of Fluent NHibernate, was kind enough to port these capabilities into Fluent NHibernate itself; so this interface has been dropped in RC 2.
713 * Between RC 1 and 2, added and then removed /NHibernate/FluentNHibernate/AutoPersistenceModelExtensions.cs: In the RC 1 compatible code, I added this extension to AutoPersistenceModel to automatically apply any override classes from a specific assembly. With James Gregory's port of this functionality to Fluent NHibernate, this class has been dropped in the RC 2 compatible code.
714 * /NHibernate/Repository.cs: Changed GetAll and FindAll to return an IList rather than a List to be more loosely coupled.
715 * /NHibernate/NHibernateRepository.cs: Changed FindAll to return an IList rather than a List to be more loosely coupled.
716
717 SharpArch.Testing
718 * BREAKING CHANGE ~ /EntityIdSetter.cs: Changed use of EntityIdSetter from EntityIdSetter<>.SetIdOf() to EntityIdSetter.SetIdOf<>()
719
720 SharpArch.Web
721 * /Areas/AreaViewEngine.cs: Added a needed "useCache" variable to FindPartialView() and FindView() for RC compatibility
722 * /CommonValidator/ValidatableModelBinder.cs: This new class inherits DefaultModelBinder to introduce domain driven validation to the binding process. (This is in contrast to the MVC IDataErrorInfo which uses exceptions for raising validation issues. See the class comments for more information.)
723
724 SharpArch.Web.Castle
725 * WindsorExtensions.cs: Dropped RegisterController() and RegisterControllersByArea() extension methods; MvCContrib has this fixed now - so need need for the extensions anymore.
726
727 Northwind - All Projects
728 * Added CommonAssemblyInfo.cs to all projects and removed duplicate assembly info attributes.
729
730 Northwind.ApplicationServices
731 * New class library to hold application services (see Evans' Domain Driven Design for more info about application services)
732
733 Northwind.Web
734 * Within Northwind.Web.csproj (and VS project template), added post compiler step as outlined in http://webdevdotnet.blogspot.com/2009/02/aspnet-mvc-rc-compiler-post-build-step.html* Renamed Hibernate.cfg.xml to NHibernate.config so that you can't browse to it on the web server
735 * Global.asax.cs:
736 - Passed location of NHibernate.config to NHibernateSession.Init()
737 - For RC 1, I had within Application_Start, I added "ModelBinders.Binders.DefaultBinder = new ValidatableModelBinder();" to replace the default binder with one that seamlessly integrates CommonValidator capabilities; for RC 2 (the current release), I've removed this again to have more consistent post behavior between Create and Edit
738 * /Scripts/jquery*.js: Updated to 1.3.2
739 * /Views/Organization/Employees/Index.aspx: Changed the delete link to an input button within a form which includes an anti-forgery token; deletes should only happen via POST requests for better security
740
741 Northwind.Web.Controllers
742 * /Organization/EmployeesController.cs:
743 - Replaced validation mechanism with ModelState.IsValid which now leverages ValidatableModelBinder
744 - Moved transfer of form properties to persistent object to within ModelState.IsValid path
745 - Dropped RollbackTransaction since it's no longer necessary
746 - Dropped use of MvcValidationAdapter.TransferValidationMessagesTo since it's done via ValidatableModelBinder
747 - Added ValidateAntiForgeryToken to the post actions
748
749 Northwind.Tests
750 * /Northwind.Data/NHibernateMaps/MappingIntegrationTests.cs: Renamed "Hibernate.cfg.xml" parameter to "NHibernate.config" (discussed under Northwind.Web changes)
751
752 ----------------------------------------------
753 ----------------------------------------------
754 1.0 Beta (rev 337) - S#arp Architecture for ASP.NET MVC Beta with NHibernate 2.0.1
755 ----------------------------------------------
756 ----------------------------------------------
757
758 New and exciting in this release:
759 * CRUD Scaffolding generation is now available
760 * Added CommonServiceLocator to provide IoC agnosticism to the non-web layers
761 * You no longer need to register custom repositories to Castle Windsor...it's now done with voodoo magic (thanks Kyle Baley for the voodoo magic!)
762 * Added formal solution structure to help organize applications
763 * View "areas" are seamlessly supported as subfolders under the Views folder
764 * You no longer need to install ASP.NET MVC to create and edit S#arp Architecture projects
765 * NHibernate auto mapping is now available (thanks Jay Oliver!)
766 * Validation is now abstracted, similarly to CommonServiceLocator...use NHibernate Validator out of the box or supply your own! (thanks Luis Abreu for being a pain in the arse until this change was made! ;)
767
768 -------
769
770 Assembly Dependencies:
771 * ASP.NET MVC Beta
772 * Castle 1.0 RC3
773 * Fluent NHibernate 0.1 (rev 207)
774 * Json.NET 3.5 Beta 2
775 * Microsoft.Practices.ServiceLocation 1.0 (CommonServiceLocator)
776 * NHibernate 2.0.1
777 * NHibernate.Validator 1.0
778 * MvcContrib Beta (rev 697)
779 * Rhino.Mocks 3.5.0.1337
780 * System.Data.SQLite.DLL 1.0.60.0
781
782 -------
783
784 Changes to /src:
785
786 SharpArch Solution
787 * All projects are now strongly signed with exception of SharpArch.Web.Castle (The MvcContrib dependency isn't signed; there's only one class in this SharpArch library, so you can move it to your project to sign everything.)
788 * Added support for Fluent NHibernate automapping (see http://groups.google.com/group/sharp-architecture/browse_thread/thread/ef799cfe75835cb4/468c6c18ae1cd239 for patch details which have been applied)
789
790 SharpArch.Core
791 * BaseObject.cs ~ Introduced this base class to consolidate object comparison functionality used by both DomainObject and ValueObject
792 * BREAKING CHANGE ~ EnumDescription.cs: This class has been dropped from the library; it doesn't have anything to do with S#arp Architecture; if you miss it dearly, you can find it described at http://devlicio.us/blogs/billy_mccafferty/archive/2006/10/16/Show-User_2D00_Friendly-enum-Translations.aspx
793 * BREAKING CHANGE ~ Renamed IDomainObject.cs to IValidatable.cs to reflect what it's really doing; also simplified IValidatable to contain simply IsValid()
794 * BREAKING CHANGE ~ Dropped DomainObject.cs and PersistentObject.cs and replaced them with Entity.cs which now exists in /DomainModel namespace. Here are steps to take to accommodate:
795 1) Do a solution wide find and replace of "PersistentObject" with "Entity"
796 2) Change every call to ".ValidationMessages" to ".ValidationResults()"
797 3) Manually add "using SharpArch.Core.DomainModel;" onto every page having an Entity
798 * ValueObject.cs: Added this value-object base class to support this missing base class for DDD
799 * See http://groups.google.com/group/sharp-architecture/browse_thread/thread/6c8e626535a47219 for a more thorough summary of the changes to SharpArch.Core and the validation infrastructure
800
801 SharpArch.Data
802 * BREAKING CHANGE ~ Renamed Repository.GetByProperties(), Repository.GetUniqueByProperties(), Repository.GetByExample(), Repository.GetUniqueByExample() to FindAll(properties/example) and FindOne(properties/example)
803 * BREAKING CHANGE ~ Repository.cs: This now implements the simpler IRepository<> instead of INHibernateRepository<>; Moved the NHibernate specific methods Get(id, lockMode), Load(id), Load(id, lockMode), FindAll(exampleInstance), FindOne(exampleInstance), Save(entity), Update(entity), Evict(entity) to NHibernateRepository<>; If you write a custom repository which needs to implement methods from INHibernateRepository<>, you'll want to inherit from this new NHibernateRepository<> class
804 * /NHibernate/NHibernateSession.cs: Added RegisterInterceptor(IInterceptor) to be optionally invoked after you've initialized NHibernate configuration
805
806 SharpArch.Web
807 * /Areas/AreaRouteHelper.cs: New class for supporting controller/view "areas"
808 * /Areas/AreaViewEngine.cs: New class for replacing the default view engine for supporting use of areas
809 * /JsonNet/JsonNetResult.cs: New ActionResult for returning Json.NET result
810 * BREAKING CHANGE ~ /CommonValidator/MvcValidationAdapter.cs: Moved from /NHibernate/Validator/MvcValidationAdapter.cs
811
812 SharpArch.Web.Castle
813 * Added this library to house extension methods for Castle related to registering controllers and custom repositories
814
815 Northwind Solution
816 * Modified solution structure to reflect the following
817 /MyProject - Contains MyProject.sln
818 /app - Contains the core project layers.
819 /MyProject.Core
820 /MyProject.Data
821 /MyProject.Web
822 /MyProject.Web.Controllers
823 /lib - Contains the solution items for the deployable application.
824 /db - Contains database schema information; e.g., the result of scaffolding and/or NHibernate's schema export.
825 /docs - Project documents.
826 /logs - Output location for log files.
827 /tests
828 /MyProject.Tests
829 /tools
830 /build - Empty folder for housing build related stuff.
831 /lib - Contains the solution items for the tests project and all other non-deployable assemblies.
832 /CrudScaffolding - Customizable CRUD, scaffolding generation code.
833 * Modified solution to accommodate controller/view "areas"; the change were numerous and should be reviewed within the patch associated with http://code.google.com/p/sharp-architecture/issues/detail?id=27
834 * Moved all employee related artifacts (controller, domain, views, etc.) under a namespace of "Organization" to show how areas are used
835
836 Northwind.Web.Controllers (formerly Northwind.Controllers)
837 * Added a reference to Microsoft.Practices.ServiceLocation.dll
838 * RouteRegistrar.cs: Registered map for "Root"; added ignore for favicon.ico
839 * Renamed this project from Northwind.Controllers to Northwind.Web.Controllers. To migrate this change to your own project:
840 In your project:
841 0) Before starting this, clear out all your compiled bin directories to avoid NHibernate getting confused with obsolete DLLs lying around
842 1) Renamed YourProject.Controllers to YourProject.Web.Controllers
843 2) In YourProject.Web.Controllers' project properties, renamed Assembly name and Default namespace of "YourProject.Controllers" with "YourProject.Web.Controllers"
844 3) Did a solution wide find and replace of "YourProject.Controllers" to "YourProject.Web.Controllers"
845 4) Via VS, added the folder "YourProject.Web/Controllers" under YourProject.Tests and moved the contents of YourProject.Tests to this new folder; finally deleted the YourProject.Controllers folder from the YourProject.Tests project
846 5) Successfully compiled all changes and closed VS
847 6) Renamed the YourProject.Controllers folder to YourProject.Web.Controllers
848 7) Reopened the SLN and replaced the missing project with the one from the renamed folder and then added a reference to YourProject.Tests and YourProject.Web
849
850 In CrudScaffolding:
851 1) Moved Templates/Controllers to Templates/Web/Controllers
852 2) Moved Templates/Tests/Controllers to Templates/Tests/Web/Controllers
853 3) Modified paths within Templates/ScaffoldingGenerator.tt to account for the moved files
854 4) Did a *project* wide find and replace of ".Controllers" to ".Web.Controllers"
855 5) Within ScaffoldingGenerator.tt, modified the third line under the GenerateControllerAndTests() method to be the following:
856 string targetPathRoot = testsRootFolder + solutionName + ".Tests\\" + solutionName + ".Web\\Controllers\\";
857 6) Within ScafolldingGenerator.tt, modified the third line under the AddFileToProject() method to be the following:
858 if (pathOfProjectFileToAddTo.IndexOf(project.Name + ".csproj") > -1) {
859
860 Northwind.Core
861 * Added a reference to Microsoft.Practices.ServiceLocation.dll
862
863 Northwind.Data
864 * Added a reference to Microsoft.Practices.ServiceLocation.dll
865
866 Northwind.Tests
867 * Moved project to /NorthwindSample/tests/Northwind.Tests
868 * Added a reference to Microsoft.Practices.ServiceLocation.dll, Castle.Core.dll, Castle.MicroKernel.dll, Castle.Windsor.dll to support configuring IoC from the tests layer
869 * /Northwind.Controllers/RouteRegistrarTests.cs: Added call to "Clear()" the RouteTable during SetUp()
870 * /Northwind.Data/NHibernateMaps/MappingIntegrationTests.cs: Changed relative path to account for new solution structure; e.g., "../../../../app/Northwind.Web/Hibernate.cfg.xml"
871
872 Northwind.Web
873 * Added a reference to Microsoft.Practices.ServiceLocation.dll
874 * Default.aspx.cs: Modified RewritePath to pass in false for the rebasePath parameter
875 * Global.asax.cs: Added CommonServiceLocator support and removed implementation of IContainerAccessor (use CSL instead)
876 * Northwind.Web.csproj: Removed "{603c0e0b-db56-11dc-
877 be95-000d561079b0};" from top to remove dependency on ASP.NET MVC being installed
878 * web.config: Changed relative path to log4net output file to reflect new solution structure; e.g., <file value="../../logs/Northwind.Web.log"/>
879 * /CastleWindsor/CastleExtensions.cs: Added extension to find interfaces for custom repositories
880 * /CastleWindsor/ComponentRegistrar.cs: Replaced manual custom repository registrations with auto-registration of custom repositories; Added registration of IRepositoryWithTypedId and INHibernateRepositoryWithTypedId; Modified auto-bindings to account for the new NHibernateRepository<> and NHibernateRepositoryWithTypedId<,> classes
881
882 Northwind Solution Items
883 * Added NorthwindSample/Solution Items/CommonServiceLocator.WindsorAdapter.dll
884 * Added NorthwindSample/Solution Items/Microsoft.Practices.ServiceLocation.dll
885
886 ----------------------------------------------
887 ----------------------------------------------
888 0.9.114 - ASP.NET MVC Beta, NH 2.0.1, NHibernate.Validator, Fluent NHibernate, Castle Windsor
889 ----------------------------------------------
890 ----------------------------------------------
891
892 New and exciting:
893 * A Visual Studio 2008 template project has been added under /TemplatesAndCodeGen to get your own S#arp Architecture project up and running quickly
894 * Replaced Ninject with Castle Windsor
895 * Added support for behavior driven unit testing
896 * Unit tests now use an in-memory SQLite database for testing data access methods along with providing an integration verification mechanism to check mappings against a live database
897
898 -------
899
900 Assembly Dependencies:
901 * ASP.NET MVC Beta
902 * Castle 1.0 RC3
903 * Fluent NHibernate 0.1
904 * NHibernate 2.0.1
905 * NHibernate.Validator 1.0
906 * MvcContrib Revision 635 (later than 0.0.1.137 release from CodePlex)
907 * Rhino.Mocks 3.5.0.1337
908 * System.Data.SQLite.DLL 1.0.60.0
909
910 -------
911
912 Changes to /src:
913
914 ** Search for "BREAKING CHANGE" below to find each of the breaking changes **
915
916 SharpArch.Data
917 * BREAKING CHANGE ~ Moved NHibernate/RepositoryUnitTestsBase.cs to SharpArch.Testing.NUnit/NHibernate and renamed it to be DatabaseRepositoryTestsBase. To fix, simply add a "using SharpArch.Testing.NUnit.NHibernate;" to any test fixture class which inherits from RepositoryUnitTestsBase and rename the parent to DatabaseRepositoryTestsBase
918
919 SharpArch.Testing
920 * Added this new, stand-alone library to consolidate general, unit testing utilities
921 * PersistentObjectIdSetter.cs: Used to set the ID of a persistent object for unit testing purposes; this class was originally in Northwind.Tests
922
923 SharpArch.Testing.NUnit
924 * Added this new, stand-alone library to support NUnit
925 * BehaviorSpecificiationTestsBase.cs: This optional text fixture base class provides a base class for BDD unit tests, as described at http://flux88.com/blog/the-transition-from-tdd-to-bdd/.
926 * SyntaxHelpers.cs: This optional extensions class adds a number of fluent NUnit syntax capabilities. To use, simply add a reference to SharpArch.Testing.NUnit to have them available from your unit tests.
927 * NHibernate/DatabaseRepositoryTestsBase.cs: This is the old SharpArch.Data/NHibernate/RepositoryUnitTestsBase.cs class provided for backwards compatibility. The preferred mechanism for database unit testing is using an in-memory database, described next.
928 * NHibernate/RepositoryBehaviorSpecificationTestsBase.cs: Provides an optional base class for developing behavior driven unit tests against an auto-generated database, suggested to be in-memory, SqlLite database. (See Northwind.Tests for an example.)
929 * NHibernate/RepositoryTestsBase.cs: Behaves similarly to the old SharpArch.Data/NHibernate/RepositoryUnitTestsBase.cs but auto-generates the database, suggested to be in-memory, SqlLite database. (See Northwind.Tests for an example.)
930
931 SharpArch.Web
932 * BREAKING CHANGE ~ Ninject/ControllersAutoBindModule.cs: This class has been deleted. If you need it for backwards compatibility, you can get the code for this class from version 0.9.72 and put it into your application.
933
934 SharpArch Solution Items
935 * BREAKING CHANGE ~ Deleted Ninject.Conditions.dll and Ninject.Core.dll. If you need them for backwards compatibility, you can get them from version 0.9.72 and add them to your application.
936 * Updated MvcContrib*.dll dependencies
937
938 Northwind.Controllers:
939 * RouteRegistrar.cs: Added this class to pull route registration into the controllers layer.
940
941 Northwind.Web
942 * /CastleWindsor/: Added support for Castle Windsor configuration within the class ComponentRegistrar.cs
943 * /NinjectModuldes/: Deleted this folder and replaced it with /CastleWindsor/
944 * Hibernate.cfg.xml: Extracted NHibernate settings to this file and set the "Copy to Output Directory" to "Copy always"
945 * Global.asax.cs: Modified Global.asax.cs to pass in path to the HBM dll using "~" for the relative path; dropped the optional path to the Hibernate.cfg.xml now that it's being copied to the output directory (i.e., to the /bin directory); moved route registration to /Northwind.Controllers/RouteRegistrar.cs; added Castle Windsor configuration.
946 * web.config: Dropped assembly redirect for Ninject and added log4net configuration
947
948 Northwind.Tests
949 * App.config: Removed "nhibernate.config.path" from appSettings; it now uses Hibernate.cfg.xml, discussed next
950 * Hibernate.cfg.xml: Added this file and set its "Copy to Output Directory" to "Copy always"; this now uses an in-memory SqlLite database for DB tests
951 * All DB test fixtures now inherit from either RepositoryTestsBase or RepositoryBehaviorSpecificationTestsBase using the in-memory database
952 * Northwind.Data/NHibernateMaps/MappingIntegrationTests.cs: Test fixture which tests every mapping file against the database sepcified in the application's "live" database NHibernate configuration file (e.g., the one found within the Northwind.Web project); this ensures that the "live" database is compliant with the mapping files since the unit tests are now using an in-memory database.
953
954 Northwind.TestsUsingDevelopmentDatabase
955 * Added this new, stand-alone library to demonstrate unit testing against a "live" development database. The preferred mechanism is to use an in-memory database, as demonstrated within Northwind.Tests, but this is here to show backward compatibility for the previous approach.
956
957 Northwind Solution Items
958 * Deleted Ninject.Conditions.dll, Ninject.Core.dll and MvcContrib.Ninject.dll
959 * Added Castle.MicroKernel.dll, Castle.Windsor.dll and MvcContrib.Castle.dll
960
961 ** Version Acknowledgements **
962 * A big thanks goes out to Lee Carter for providing code for running DB unit tests within an in-memory SQLLite database.
963
964 ----------------------------------------------
965 ----------------------------------------------
966 0.9.72 - ASP.NET MVC Beta, NH 2.0.1, Ninject 1.0, NHibernate.Validator 1.0, Fluent NHibernate 0.1
967 ----------------------------------------------
968 ----------------------------------------------
969
970 Migrating from 0.8.1 to 0.9.0 (see the Northwind sample code for implementation examples):
971 * Follow instructions for upgrading to ASP.NET MVC Beta. There were respective modifications made to web.config and assembly dependencies. Also included changes to Global.asax.cs and the inclusion of Default.aspx.cs
972 * Change the name of the "web.config" AppSetting within Northwind.Tests/App.config to "nhibernate.config.path"
973 * Add a new AppSetting within Northwind.Tests/App.config called "nhibernate.mapping.assembly" which contains the name of the assembly which holds the mapping artifacts
974 * Add an assembly redirect for NHibernate to app.config and web.config; Fluent NHibernate is a little behind
975 * Change any calls to myDao.CommitChanges() to myDao.DbContext.CommitChanges()
976 * Change any references to DomainSignatureComparable to DomainObject
977 * If you've overridden HasSameDomainObjectSignatureAs, changes the parameter type to IDomainObject (instead of DomainSignatureComparable)
978 * Rename references to SharpArch.Core.PersistenceSupport.IDao/IDaoWithTypedId to IRepository/IRepositoryWithTypedId (as a number of developers have rightly indicated is more inline with DDD)
979 * Rename references to SharpArch.Data.NHibernate.GenericDao/GenericDaoWithTypedId to Repository/RepositoryWithTypedId
980 * Rename references to SharpArch.Data/NHibernate/DaoTests.cs to RepositoryUnitTestsBase.cs
981 * Greatly simplified IRepository and moved NHibernate specific methods to SharpArch.Core/PersistenceSupport/NHibernate/INHibernateRepository.cs; consequently, SharpArch.Core/PersistenceSupport/IRepository.cs, which was IDao.cs, now contains the following breaking changes:
982 - LoadAll was changed to GetAll (changed to standardize "Get" as the retrieval keyword);
983 - Get(id, lockMode), GetByExample, GetUniqueByExample, Load(id), Load(id, lockMode), Save, Update and Evict were all moved to SharpArch.Core.PersistenceSupport.NHibernate.INHibernateRepository.
984 IRepository was simplified to provide a simpler mechanism that is more NHibernate agnostic and is simpler to understand and use. You may still wish to use the NHibernate-specific one. Consequently, decide if you'd like to use SharpArch.Core.PersistenceSupport.IRepository/IRepositoryWithTypedId or SharpArch.Core.PersistenceSupport.NHibernate.INHibernateRepository/INHibernateRepositoryWithTypedId and adjust your code, accordingly. There's nothing to stop you from using IRepository most of the time and INHibernateRepository on occassion...but I'd only recommend using it when absolutely necessary. For example, the only time the Northwind sample uses it is to support Save vs. Update for objects with assigned IDs (which are a bad practice to use anyway).
985 * Optionally rename your *Dao.cs classes to *Repository.cs to be consistent with the IRepository base interface.
986 * Optionally move NHibernate settings out of web.config into Hibernate.cfg.xml (the Northwind contains an example); if you do so, be sure to change the path in MyProject.Tests/app.config to point to the externalized file
987 * Optionally migrate your HBM files to Fluent NHibernate class maps within MyProject.Data. If you do so, be sure to delete the HBMs (or simply set their compile behavior to "Content" rather than "Embedded Resource" during the migration. You'll then need to change the mapping assembly information for NHibernate. REGARDLESS, you'll need to remove the assembly mapping property from your NHibernate configuration settings and modify the NHibernate session initialization within Global.asax.cs; see Northwind.Web/Global.asax.cs for an example. Currently, you have to provide the full path to the requested resources; I'm looking to simplify this if possible.
988
989 *** Non Breaking Changes ***
990
991 The documentation within <root>/docs has been completely updated; I highly recommend you review it to see changes in action, particularly with respect to Fluent NHibernate.
992
993 Modifications to <root>/bin:
994 * All dependencies needed for your own project are now included in the bin folder
995
996 Modifications to SharpArch:
997 * SharpArch.Core/PersistenceSupport: Added IPersistentObject and IDomainSignatureComparable to provide your own implementation, if you feel so inclined
998 * SharpArch.Data/NHibernate/NHibernateSession.cs: Inclusion of NHibernate.Validator. Optional NHibernate.Validator config file may be passed to NHibernateSession.Init within Global.asax.cs
999 * SharpArch.Data/NHibernate/NHibernateSession.cs: Init has been overloaded to to accept ISessionStorage without config file info.
1000 * Marked both DomainSignatureAttribute and DomainSignatureComparable as Serializable (thanks athmer!)
1001 * The Equals/GetHashCode has been split; Equals no longer uses the result of GetHashCode for the basis of equality checking. The affected classes include SharpArch.Core/DomainSignatureComparable.cs and SharpArch.Core/PersistenceSupport/PersistentObject.cs. Although the underlying mechanism for these methods were altered, it should introduce no breaking changes.
1002 * The methods GetByProperties(IDictionary<string, object>, propertyValuePairs) and GetUniqueByProperties have been added to IRepository and Repository. A unit test using this feature has been added to Northwind.Tests/Northwind.Data/CustomerDaoTests.cs
1003 * IRepository now exposes IDbContext which provides capabilities such as CommitChanges, Begin/Commit/RollbackTransaction
1004 * Added validation support methods to DomainObject
1005
1006 Modifications to Northwind sample:
1007 * Added full CRUD with validation for employee objects
1008 * Modified Northwind.Core/Order.cs to show an example of overriding HasSameDomainObjectSignatureAs()
1009 * Updated dynamic links to use Html.ActionLink
1010 * Added a many-to-many example; specifically:
1011 - Northwind.Core
1012 * Employee has a many-to-many relationship to Territory objects.
1013 * Territory has a many-to-many relationship back to Employee objects. This is the inverse side of the relationship.
1014 * Region has a one-to-many relationship to Territory; the relationship is defined in the Territory HBM.
1015
1016 - Northwind.Tests
1017 * Northwind.Core/RegionTests.cs, TerritoryTests.cs, and EmployeeTests.cs test the domain model of the new classes.
1018 * Northwind.Data/EmployeeDaoTests.cs and TerritoryDaoTests.cs test the many-to-many relationships in the database along with the many-to-one from Territory to Region.
1019 * Made general clean ups to make the code simpler and with less typing (e.g., changed "<%= (ViewData.Model as Customer).CompanyName%>" to simply "<%= ViewData.Model.CompanyName%>")
1020
1021 ----------------------------------------------
1022 ----------------------------------------------
1023 0.8.1 - MVC Preview 5, NH 2.0.1 and Ninject 1.0
1024 ----------------------------------------------
1025 ----------------------------------------------
1026
1027 Baseline history record
Something went wrong with that request. Please try again.