Is it possible to use something like this wrapper with fluent configuration?
http://jeffreypalermo.com/blog/use-this-nhibernate-wrapper-to-keep-your-repository-classes-simple/
If so, where would I add the fluent config?
Also, would this be suited to use in both asp.net and windows applications?
I'm planning to use the repository patte...
Hello,
I am trying to get Fluent nHibernate to generate mappings so I can take a look at the files and the sql.
My code is based on this post and on what I can glean from the documentation.
http://stackoverflow.com/questions/1375146/fluent-mapping-entities-and-classmaps-in-different-assemblies
I am using the latest code from git.
He...
I'm looking for ways to generate the application database full structure based on the NHibernate mapping data. The idea is to give the user an option to supply a database-connection string and then to build their a database with the structure that the application needs.
The database need to independent - it means that it needs to work w...
I have an entity and its mapping:
public class Test
{
public virtual int Id { get; set; }
public virtual string Name { get; set; }
public virtual string Description { get; set; }
}
public class TestMap : EntityMap<Test>
{
public TestMap()
{
Id(x => x.Id);
Map(x => x.Name);
Map(x => x.Descript...
how to call a oracle database storedprocedure from asp.net mvc using nhibernate and how to use sys_refcursor to display a data in view pages give me sample application . thanks
...
1) Is it possible to use Burrow with winforms application or WPF application?
2) Are there any samples how to configure Burrow with winforms app.
...
We have a great project that use NHibernate as ORM. We want to migrate to L2S or L2EF. Can we do everything that we do by NHibernate?
Do you propose us that doing this work? What is the advantages and disadvantages of this work?
Are these two ORMs have common capabilities?
Note: Our project written in C#.
...
I am used to hbm files and have started using fluent nhibernate recently.
Creating an m-to-m relationship between two entities A and B is quite simple
In entity A, I create:
public virtual IList<B> Bs { get; set; }
and then I use:
mapping.HasManyToMany(x => x.Bs);
That’s it and I can do:
A a = new A();
a.Bs.Add(b);
My problem ...
Hi all,
I'm using NHibernate 2.1.2.400, and I'm having an issue with a an ISQLQuery query.
The reason why I use an ISQLQuery here, is that this query uses a table for which I have no entity mapped in NHibernate.
The query looks like this:
ISQLQuery query = session.CreateSQLQuery (
"select p.*, price.* " +
"from prestation p l...
I'd like to sort my result like this:
First I want all rows/objects where a column/property is not null, then all where the colmn/property is null.
Then I want to sort by another column/property.
How can I do this with ICriteria? Do I have to create my own Order class, or can it be done with existing code?
ICriteria criteria = Sessi...
I'm not sure how to approach queries that don't map 1:1 to my persistent entities - in other words, distinct and aggregate queries. For example, I need to retrieve a distinct list of property values for populating a drop-down list. Should I write a class and a mapping for the "entities" that are returned by this query? Or should I just u...
I am curious how other Resharper users deal wih R#'s complaint about virtual methods it thinks are unused because it can't tell that NHIb will use them at runtime. I currently leave it as a hint, reluctantly, although am tempted to shut it off completely.
Cheers,
Berryl
example property or method where R# sees that a virtual member is ...
Is there a Class Map generator for Fluent NHibernate? I need something like db2hbm but I want it to generate Fluent Class Maps instead of xml mappings.
I am aware of AutoMapping for Fluent but that is not what I want. I want to be able to generate Class Map files from tables in database and push them to my src repository.
...
I think I am stuck in the paralysis of analysis. Please help!
I currently have a project that
Uses NHibernate on SQLite
Implements Repository and Unit of Work pattern: http://blogs.hibernatingrhinos.com/nhibernate/archive/2008/04/10/nhibernate-and-the-unit-of-work-pattern.aspx
MVVM strategy in a WPF app
Unit of Work implementation i...
Hello,
I have a User which can have many Emails. This is mapped through a List collection (exposed by IEnumerable Emails on the User).
For each User one of the Emails will be the Primary one ("Boolean IsPrimary" property on Email).
How can I get the primary Email from User without NHibernate loads every email for the User ?
I have the...
I am customizing N2CMS's database structure, and met with an issue. The two classes are listed below.
public class Customer : ContentItem
{
public IList<License> Licenses { get; set; }
}
public class License : ContentItem
{
public Customer Customer { get; set; }
}
The nhibernate mapping are as follows.
<class name="N2.ContentI...
I can connect fine with normal ado.net. However i get the following error when i tried to connect nHibernate.
hibernate.cfg.xml
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>
<...
Hi All
How can I change the connection string from nhibernate.config file using nant
the problem is that all examples are about changing attribute value, but nhibernate has inner text
eq:
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="connection.connection_string">Data Sourc...
Many search engine have the 'did you mean' functionality.
Is there a simple way to use (N)Hibernate (e.g. ICriteria) to find an entity (e.g. keyword) based on similarity. Please note that I do not mean Expression.Like or something like this.
I hope this question makes sense.
Thanks.
Christian
PS:
similarity means in my case (let us...
Is there a way in fluent nhibernate (or possibly NHibernate in general) to tell it to generate the primary keys differently? It creates the column name for the key fine, but the index/constraint gets weird generated names like:
PK_Address_3214EC2725332734
PK_CreditCa_3214EC2756CA82C8
etc...
I can use straight sql to rename them but ...