Hi,
Im currently working on a code base that avoids Repository.Add() as
much as possible.
Instead, we use an aggregate root along with cascade all mapping. (eg:
to add something, we simply do customer.Orders.Add(...))
We're also using sequential guids generated in the code.
The problem Ive noticed
I have a domain object called Product, that has a many to many
collection of type Category.
I want to retrieve just the categories that belong to a specific
Product.
var result = Session.CreateCriteria()
.Add(Restrictions.Eq("Name", "Television"))
.CreateCriteria("C
Thanks Fabio and Donald. It was quite an insight realising that Wcf
doesnt (by default) generate a context per call.
Explains alot of our problems.
Thanks for the help.
Andy
On 13 Nov, 23:28, Fabio Maulo wrote:
> ah...
> and don't forget to configure NH
>
>
> uNhAddIns.Ses
text.Bind(session);
> item();
> tx.Commit();
> CurrentSessionContext.Unbind(factory);
> }
>
> });
>
> On Nov 12, 12:36 pm, Andyk wrote:
>
>
>
> > Hi,
> > can anyone tell me which sessioncontext should be used in a Wcf
> > e
Hi,
can anyone tell me which sessioncontext should be used in a Wcf
environment.
Currently I have a web application calling a WCF service, hosted in
IIS. The WCF service does all the work and uses NHibernate.
I am using sessioncontext in a static class to manage nhibernate
session like this:
Here are the mappings:
I removed the irrelevant properties for clarity.
Wolfgang, that didnt
Hi all,
Im working on a Cuyahoga project and having some issues trying to
write a complex hql query and was wondering if anyone could help.
I have a domain that contains Nodes. Nodes have Sections which contain
Articles. Nodes also have ChildNodes.
I'm trying to retrieve all Articles within a Nod
Hi all,
I need to call a stored procedure and Im using the following code to
do it:
session.CreateSqlQuery("exec proc_GetFunds").AddEntity(typeof(Fund));
(Not sure if this is the right way or not?)
The problem is, that I need to provide several paramters such as a
currency Id and two date period
collection to not be lazy loaded.
regards
Andy
On 27 Apr, 22:30, Andyk wrote:
> Hi,
> could anyone kindly spot the obvious, Im getting a "Failed to
> initialise" exception on my code and I cant see why.
>
> [Test]
> public void Should_be_abl
Hi,
could anyone kindly spot the obvious, Im getting a "Failed to
initialise" exception on my code and I cant see why.
[Test]
public void Should_be_able_to_insert_a_child_category()
{
string parentName = "Electronics";
string childName = "Televisio
Hi,
Im looking for some advise on how to go about presenting some report
data.
In my scenario, I have the following Sales object:
SalesId
Customer
SalesType
Amount
I want to be able to produce a report, a row for each customer, with
the different salesTypes as columns, and Amount values in the mi
11 matches
Mail list logo