nhadi / sharp-architecture Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/sharp-architecture
License: Other
Automatically exported from code.google.com/p/sharp-architecture
License: Other
Although unit testing against a "live" DB should still be allowed, it would
be great to have the option to run all integration tests using an in-memory
SqlLite DB.
Original issue reported on code.google.com by [email protected]
on 17 Nov 2008 at 6:27
It doesn't make sense for the globally acting CommitChanges to be on the
DAOs themselves.
Original issue reported on code.google.com by [email protected]
on 9 Nov 2008 at 3:52
Here's what WebSessionStorage should look like:
public class WebSessionStorage : ISessionStorage
{
private const string CurrentSessionKey =
"nhibernate.current_session";
public WebSessionStorage(HttpApplication app) {
app.EndRequest += new EventHandler
(Application_EndRequest);
}
public ISession Session {
get {
HttpContext context = HttpContext.Current;
ISession session = context.Items
[CurrentSessionKey] as ISession;
return session;
}
set {
HttpContext context = HttpContext.Current;
context.Items[CurrentSessionKey] = value;
}
}
void Application_EndRequest(object sender, EventArgs e) {
ISession session = Session;
if (session != null) {
session.Flush();
session.Close();
HttpContext context = HttpContext.Current;
context.Items.Remove(CurrentSessionKey);
}
}
}
Here's how I'm setting it all up:
public class GlobalApplication : HttpApplication
{
public override void Init() {
base.Init();
NHibernateSession.Init(new WebSessionStorage
(this), null);
DaoContainer.Init(new AttributedDaoFactory());
}
}
Original issue reported on code.google.com by [email protected]
on 11 Aug 2008 at 11:16
I think that S#arp Architecture should not take away the freedom of serializing
the persistent
objects.
Original issue reported on code.google.com by [email protected]
on 25 Aug 2008 at 2:44
Attachments:
See
http://nhforge.org/blogs/nhibernate/archive/2009/01/07/typesafe-icriteria-using-
lambda-expressions.aspx
for details
Original issue reported on code.google.com by [email protected]
on 9 Jan 2009 at 2:34
Suggestion from comments in
http://devlicio.us/blogs/billy_mccafferty/default.aspx
Original issue reported on code.google.com by [email protected]
on 9 Jan 2009 at 9:19
Hi Billy, I've made a small change to the branch to show you how it works.
Once you're fine with my change I'll merge it into the trunk.
After the review, I'll merge this branch into:
/trunk
Original issue reported on code.google.com by [email protected]
on 26 Dec 2008 at 7:48
The attached patch adds the CLSCompliant attribute to all ProjectBase
assemblies. This prevents a
lot of warnings if a project which uses ProjectBase tries to be CLS compliant.
Original issue reported on code.google.com by [email protected]
on 25 Aug 2008 at 1:56
Attachments:
Equals should not use the result of GetHashCode for basing equality due to
possible collisions.
Original issue reported on code.google.com by [email protected]
on 6 Nov 2008 at 11:27
Attachments:
Kyle brought this up in his DimeCasts
Original issue reported on code.google.com by [email protected]
on 9 Jan 2009 at 12:44
See
http://groups.google.com/group/sharp-architecture/browse_thread/thread/e81ab82eb
38e1c2?hl=en
for a discussion of this.
Original issue reported on code.google.com by [email protected]
on 9 Jan 2009 at 11:10
What steps will reproduce the problem?
1. Copy the SharpArchitecture dlls to a lib folder of a new VS2008 project
2. Set up the project configuration files along the same lines as the
sample northwind project.
3. Add the references from the lib folder to the projects as required.
What is the expected output? What do you see instead?
Run the project - exceptions occur complaining that the there is a version
mismatch in the dlls, specifically for NHibernate 2.0.0.4000 and Ninject
NHibernate, Version=2.0.0.4000, Culture=neutral,
PublicKeyToken=aa95f207798dfdb4' or one of its dependencies. The located
assembly's manifest definition does not match the assembly reference.
Could not load file or assembly 'Ninject.Core, Version=0.4.3005.35587,
Culture=neutral, PublicKeyToken=c7192dc5380945e7' or one of its
dependencies. The located assembly's manifest definition does not match the
assembly reference. (Exception from HRESULT: 0x80131040)
What version of the product are you using? On what operating system?
SharpArchitecture_0.9.72.zip, Visual Studio 2008, Windows XP
Please provide any additional information below.
Using Reflector on the .dlls verifies that the dlls included with
SharpArchitecture that reference NHibernate/Ninject do indeed reference
older versions of Ninject and NHibernate than the NHibernate and Ninject
dlls included.
What I can't figure out is how the Northwind sample project manages to run
given all of these version mismatches...
Original issue reported on code.google.com by [email protected]
on 14 Nov 2008 at 6:06
The items to add are in Billy's notebook...just adding this here so I don't
forget about it.
Original issue reported on code.google.com by [email protected]
on 28 Jan 2009 at 11:25
What steps will reproduce the problem?
1. Put some data in the database with null for a nullable column.
2. Query by properties with the value as null
3. Note that the appropriate results are not returned.
What is the expected output? What do you see instead?
I expect the rows with the property set as null to be returned.
For example (somewhat psuedo),
Dictionary propetyCriteria = new Dictionary();
propertyCriteria.Add("Column1", "Value1")
propertyCiriteria.Add("Column2", null)
Repository<SomeClass> repo = new Repository()l
repo.GetByProperties(propertyCriteria);
With a table SomeClass with columns filled as
Column1 Column2
"Value1" NULL
I would expect 1 row to be returned, but no rows are returned.
I think that GetByProperties needs to check if the value is null and add an
Expression.IsNull instead of a Expression.Eq
Original issue reported on code.google.com by [email protected]
on 7 Jan 2009 at 5:33
See thread http://groups.google.com/group/sharp-
architecture/browse_thread/thread/39207a16e1a5daee for details
Original issue reported on code.google.com by [email protected]
on 8 Jan 2009 at 3:12
Discussion at http://mail.google.com/a/emccafferty.com/?
ui=2#inbox/11ed64e0bb9d96b6
Original issue reported on code.google.com by [email protected]
on 15 Jan 2009 at 5:44
Example of using a new design using single DomainObject class
Original issue reported on code.google.com by [email protected]
on 26 Dec 2008 at 7:43
Using the wiki would be very helpful
Original issue reported on code.google.com by [email protected]
on 2 Sep 2008 at 8:15
What steps will reproduce the problem?
1. Add any image to the Northwind Sample project in the
Northwind.web/Content directory.
2. In Northwind.web/Views/Home/Index.aspx, reference the image like so:
<%= Html.Image("~/Content/YourImage.png") %>
3. Set a breakpoint in the global.asax in the Init() method.
4. Run the project
5. While loading the Index.asp page, the global.asax Init() will fire
twice. The first time, all will go well. The second time, you will get
the exception such as:
{"Could not find file 'C:\\Documents and
Settings\\xxxxx\\Desktop\\SharpArchitecture_0.9.72\\src\\NorthwindSample\\Northw
ind.Web\\Content\\Hibernate.cfg.xml'.":"C:\\Documents
and
Settings\\xxxxx\\Desktop\\SharpArchitecture_0.9.72\\src\\NorthwindSample\\Northw
ind.Web\\Content\\Hibernate.cfg.xml"}
What version of the product are you using? On what operating system?
SharpArchitecture_0.9.72.zip, Visual Studio 2008, Windows XP
Please provide any additional information below.
It appears that the second time the Init() is fired, it's base directory is
in the content directory. The problem can be fixed by modifying the
global.asax Init() to use ~/ as in the following:
public override void Init() {
base.Init();
NHibernateSession.Init(new WebSessionStorage(this),
new string[] { Server.MapPath("~/bin/Northwind.Data.dll") },
Server.MapPath("~/Hibernate.cfg.xml"));
}
Original issue reported on code.google.com by [email protected]
on 14 Nov 2008 at 10:34
I had some problems with SharpArchitecture 0.8.1, because
DomainSignatureComparable and (I think) DomainSignatureAttribute are not
marked as serializable.
Original issue reported on code.google.com by [email protected]
on 15 Oct 2008 at 11:16
Attachments:
I downloaded the source tonight and I think its very nicely done, however
from my understanding its not currently suitable to have multiple session
factories for two different databases. I trying to think of way to extend
the NHibernateSession to support this without violating the nice work. I'm
thinking of having NHibernateSession contain a static method with the
signature GetCurrent(Type aggregateRoot) and the generic DAO would call
GetCurrent(T) instead of .Current. Also for NHibernateSession to contain a
static ISessionResolver instance. I could then plug in whatever behaviour I
want - I'd implement ISessionResolver in my application solution to use
either programmatic dictionary, some config values about which
sessionfactory to use by resourceName.
What do you think?
Original issue reported on code.google.com by [email protected]
on 11 Sep 2008 at 5:38
This will help with some NAnt tasks
Original issue reported on code.google.com by [email protected]
on 2 Sep 2008 at 9:49
* Add notes in docs concerning JSON usage in PersistentObject
Original issue reported on code.google.com by [email protected]
on 2 Sep 2008 at 8:12
Example of using a new design using single DomainObject class
Original issue reported on code.google.com by [email protected]
on 26 Dec 2008 at 7:44
Attachments:
This issue was prompted from the discussion at
http://groups.google.com/group/sharp-architecture/browse_thread/thread/16c953466
e2689b2
Original issue reported on code.google.com by [email protected]
on 8 Jan 2009 at 10:07
[deleted issue]
Since ASP.NET MVC will not be supporting areas by default, this should be
standardized within S#arp Architecture.
Original issue reported on code.google.com by [email protected]
on 25 Dec 2008 at 4:56
Hi,
When using the VS template the web project is created nicely but the MVC
project type GUID is missing.
{603c0e0b-db56-11dc-be95-000d561079b0}
currently:
<ProjectTypeGuids{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-
11d3-bf4b
should be:
<ProjectTypeGuids>{603c0e0b-db56-11dc-be95-000d561079b0};{349c5851-65df-
11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b
Thanks,
Noam
Original issue reported on code.google.com by [email protected]
on 26 Jan 2009 at 7:49
http://groups.google.com/group/sharp-
architecture/browse_thread/thread/717b3fa83d30446d?hl=en
Original issue reported on code.google.com by [email protected]
on 2 Sep 2008 at 8:10
After considering various options, NHibernate.Validator looks to be a solid
addition to the SharpArch library.
Original issue reported on code.google.com by [email protected]
on 10 Oct 2008 at 4:21
It's a bit presumptuous having NUnit as the only option, and this
dependency "pollutes" the data layer with testing concerns.
Original issue reported on code.google.com by [email protected]
on 22 Nov 2008 at 6:22
See
http://groups.google.com/group/sharp-architecture/browse_thread/thread/91f339e6e
552e744
for related discussion.
Original issue reported on code.google.com by [email protected]
on 7 Jan 2009 at 10:27
Discussion at http://groups.google.com/group/sharp-
architecture/browse_thread/thread/d5ebcc61ce02b170?hl=en
Original issue reported on code.google.com by [email protected]
on 23 Jan 2009 at 3:15
The release notes and the Base_Architecture_and_Development_Guidelines.doc
are inconsistent. The release notes for SharpArchitecture 0.9.114 state
that Ninject has been removed, and ControllersAutoBindModule has been
removed, yet the Guidelines.doc still reference both NInject and
ControllersAutoBindModule.
It would also be nice if the release notes were more thorough. For
example, when you make a framework change, it would be nice to know *why*
you make the change, e.g. from NInject to Windsor. What benefits does it
provide? What were the tradeoffs? I've started using NInject for other
injection needs not provided by S#arp architecture - are the benefits of
Windsor such that I might want to change DI containers their as well?
Original issue reported on code.google.com by [email protected]
on 12 Dec 2008 at 8:58
See http://groups.google.com/group/sharp-
architecture/browse_thread/thread/107fa8b42d46d942 for related discussion.
Original issue reported on code.google.com by [email protected]
on 26 Nov 2008 at 1:22
It would be great to be able to force NHibernate to instantiate entity
classes without a default constructor by using Injection of Control. For
EXAMPLE:
public User : PersistentObject
{
protected User(IPasswordPolicy passwordPolicy)
{
}
}
I don't see any way to let my User check the newly set password for
compliance with a given policy.
Maybe it is possible to use NHibernate with NInject for this?
Greets
J. Fritsch
Original issue reported on code.google.com by [email protected]
on 19 Nov 2008 at 10:05
Hi,
TransferValidationMessagesTo is wrongly create map value for Entity that
was coming from nested viewdata.
for example:
if i have Controller view data as such (Event is from type Entity)
class EventViewData{
Event EventEntity;
bool isEditMode;
}
and i will call TransferValidationMessagesTo(ViewData.ModelState,
[EventViewData object].Event) (lets say there is an errot in Title
property of object type Event).
the method will try to map the object based on the context type + property
which will be "Event.Title" where the MVC framework will have the map as
EventEntity.Title.
The reason is that micosfot map it based ont he property name of the
ViewData object which is EventEntity and shap architecture is not aware of
this nested property.
Maybe the solution would be to allow prefix for the mapping and then
remove the object type context from the begining of the mapping key.
hope its clear.
Thanks,
Noam
BTW great job i love the framework!!!
Original issue reported on code.google.com by [email protected]
on 17 Jan 2009 at 9:21
I'm working on a project using S#arp Architecture. There were a lot of
controllers in my project and is begin to hard to maintain.
For example, I have 22 component, such as Lifting Reporting, Back
Allocation Reporting, Lifting Data Management, Back Allocation Data
Management and so forth.
Each of the component I mentioned above have their own sub component
home, report by day, report by amount and many more,
where each of this have their own views. For example
BackAllocationReportingController and
the view is Views/BackAllocationReporting/Home.ascx, Views/
BackAllocationReporting/reportbyday.ascx and so forth. All controllers
in the Controllers directory and view is in Views Directory. And this is
veru confusing.
After browsing for a while, I found Phil Haack prototype about "Areas"
at http://haacked.com/archive/2008/11/04/areas-in-aspnetmvc.aspx which
seems a nice solution for my problem.
But this is hard to implement with S#arp Architecture, because ninject
will throw error if I have two controllers with same name
(example HomeController for BackAllocationReporting and HomeController
for LiftingReporting).
Original issue reported on code.google.com by [email protected]
on 16 Nov 2008 at 11:39
N/A
Original issue reported on code.google.com by [email protected]
on 13 Jan 2009 at 4:23
See http://groups.google.com/group/sharp-
architecture/browse_thread/thread/2c67fb48ac56cd66?hl=en for a discussion
of this.
Original issue reported on code.google.com by [email protected]
on 25 Nov 2008 at 3:51
It seems to me that in the Global.asax NHibernate Session is getting inited
multiple times. (I am currently trying to determine if this is the source
of a performance problem I am having where when running in IIS6 -- pages
randomly seem to take forever to load after the initial start).
According to http://msdn.microsoft.com/en-us/library/ms178473.aspx: Init()
is "Called
once for every instance of the HttpApplication class after all modules have
been
created. "
According to
http://msdn.microsoft.com/en-us/library/system.web.httpapplication.aspx:
"Instances of the HttpApplication class are created in the ASP.NET
infrastructure,
not by the user directly. One instance of the HttpApplication class is used to
process many requests in its lifetime. However, it can process only one
request at a
time. Thus, member variables can be used to store per-request data."
Thus it seems to me that one HttpApplication object exists for every server
thread
processing requests. So the Init will get called once for every server thread
processing requests.
Should the code:
NHibernateSession.Init(new WebSessionStorage(this),
new[] { Server.MapPath("~/bin/Northwind.Data.dll") },
new AutoPersistenceModelGenerator().Generate());
be in the ApplicationStart event instead of the Init event?
(Note this is a follow up issue raised in comments of
http://code.google.com/p/sharp-architecture/issues/detail?id=18)
Original issue reported on code.google.com by [email protected]
on 22 Jan 2009 at 4:59
http://www.codeinsanity.com/2008/08/implementing-repository-and.html
Original issue reported on code.google.com by [email protected]
on 2 Sep 2008 at 8:10
http://docs.jquery.com/Release:jQuery_1.3
Original issue reported on code.google.com by [email protected]
on 26 Jan 2009 at 1:45
just try it, you'll see
Original issue reported on code.google.com by [email protected]
on 12 Jan 2009 at 7:40
See http://ayende.com/Blog/archive/2007/06/12/WCF-Windsor-Integration.aspx
for guidance
Original issue reported on code.google.com by [email protected]
on 26 Jan 2009 at 5:13
Unnecessary, extra step required if not done.
Original issue reported on code.google.com by [email protected]
on 3 Sep 2008 at 2:34
http://devpinoy.org/blogs/joeycalisay/archive/2006/07/17/Overriding-Equals-
and-GetHashCode.aspx
http://devpinoy.org/blogs/joeycalisay/archive/2007/07/16/resharper-s-
gethashcode-and-the-number-29.aspx
Original issue reported on code.google.com by [email protected]
on 2 Sep 2008 at 8:13
Having examples of each would be helpful
Original issue reported on code.google.com by [email protected]
on 2 Sep 2008 at 8:16
What steps will reproduce the problem?
1. Use the template to generate a new solution
2. Add a new project to the solution
3. Crud Scaffolding will fire throwing a bunch of errors and generating a
large amount of garbage.
What is the expected output? What do you see instead?
The new project added to the solution with out triggering the Crud Scaffolding.
What version of the product are you using? On what operating system?
I am using trunk as of 1/13/2009 on Windows XP x64
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 14 Jan 2009 at 3:36
We would like to have strong named assemblies for S#arp Architecture,
because our application uses strong named assemblies and we need to
reference signed assemblies for proper compilation.
Thanks.
Original issue reported on code.google.com by [email protected]
on 16 Dec 2008 at 2:55
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.